php: posting disabled fields

by prettyscripts on 2008-04-17 11:13:25

miscphp

when posting a form, disable field is not found in $_POST data.

this is intentional! the browser is doing in accordance to html spec – do not send disabled fields to the server.

solution

add a hidden field with the value. the value in hidden fields will be submitted / posted.

Tags: disabled field, php, post

No feedback yet

Leave a comment


Your email address will not be revealed on this site.
PoorExcellent
note: all comments are moderated. do not spam and do not advertise. only comments relevant to the post will be published.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)