Ok just read your topic in your signature. Notice you check for other form fields and not the submit button. That seems straight forward enough for me. I also noticed Fou stated we should check for every single field (which is what I have done in my other scripts for that demo site when I first started it). Think I might go with your solution of checking another field is set for example my
$_POST['name'] field.
I'm thinking of slightly modifying my code to this:
PHP Code:
if (isset($_POST['name'])){
//start my processing
(isset($_POST['submit'])) ? array_pop($_POST['submit']) : "";
}
If you relate that to the code above to my original code post, do you think this will now cover all eventualities?
Edit: Just changed my code to what I wrote above and it works great.
I'm actually on XP so I can't even get IE9, which in my opinion is an absolute joke. I have an MS system which can't run the default MS browsers latest version, what kinda crap are they pulling? Anyway the highest version I have is 8. I'll play around with the submit thing and see the result I get to gain a better understanding.
Plus, would you be willing to just briefly scan my code and see what you think? It seems a little basic to me and I feel there is more I can do to secure it. Like I've said I've tried entering crap into the fields every way possible and my processing seems to catch every possible error. So I know that I'm on the way to having a good script, I just want some opinions on how to improve it.
It works as I want so it's more of a 'you could do this' or change that
foreach loop etc type of answer im looking for. Had over 100 views with 1 reply....bad times. Is reviewing completed code something that isn't done here I think I've seen on other forums a section for 'code critique'?
Thanks for your reply!
Regards,
LC.