php: posting disabled fields

by prettyscripts on 2008-04-17 11:13:25 • Leave a comment »

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.

Your URL will be displayed.
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 />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)