We've expanded our news coverage and improved our search! Visit
oreilly.com for the latest or search for all things across O'Reilly!
Article:
 |
|
PHP Form Handling
|
| Subject: |
|
Form submission with hidden element |
| Date: |
|
2008-08-07 11:27:30 |
| From: |
|
DeputyDawg
|
Response to: Form submission with hidden element
|
|
Some browsers only transmit the name/value pair for the submit form element when the submit button is clicked. If the form is submitted with the 'Enter' key, then the name/value pair for the submit element is not sent (method POST or GET). All the other form element name/value pairs appear to be sent, including hidden elements.
Only some browsers act this way. I believe IE 7.0 is one.
Therefore you cannot use the name/value pair for the submit button as a reliable test for the form being submitted. Hidden elements do show up.
I have experienced this problem with PHP5, but not with PHP4. Cannot explain that one.
|