View Single Post
Old 05-07-2012, 08:37 PM   PM User | #14
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,515
Thanks: 45
Thanked 440 Times in 429 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Quote:
Originally Posted by Link187 View Post
Hmm.. not related? Seriously?!
It's an image, not a button so most people wouldn't set the name or value attributes and thus wouldn't code for them in their php anyway.

To be honest I see it as a null issue anyway when the most reliable way is to use a hidden field / value. Relying on the $_POST['submit'] value is asking for trouble whether you like to admit it or not. By using the hidden field you guarantee that your script will work.

Quote:
Originally Posted by Link187 View Post
And I simply said that statement is incorrect. I may not have specified thos values but they are automatically generated and sent.
But it isn't. The behaviour of IE doesn't follow many standards very well. Browsers are not supposed to generate their own form fields and transmit them and the fact that IE does this isn't right. The form does not contain a post a field with that name / value and so it IS NOT SENT. The browser is sending it's own form data which is entirely different to the html form data. There is a difference between the form data that is sent and the form data that the browser decides to tag on for its own weird reason.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.

Last edited by tangoforce; 05-07-2012 at 08:44 PM..
tangoforce is offline   Reply With Quote