$HTTP_POST_VARS doesn't accept disabled input fields
Code:
<input type='text' name='total' size='5' value='22' disabled> $Total = $HTTP_POST_VARS['total']; in my php script, I get a: Notice: Undefined index: total in C:\Server\Apache2\htdocs\bloodaxe\checkout.php on line 3 But if I remove the disabled from the input field, it works ok, but then the field is enable to be tampered with again ! How can I get it to accept the variable while still keeping the field disabled? Cheers ! |
http://www.faqs.org/docs/htmltut/for..._DISABLED.html
In the above article it seems what you are trying to is not possible and it is not a limitimation of PHP, rather HTML. Instead of disabling the input you need to make it readonly. I have not tested this, its just my interpretation of the above article, let us know if it works or not. |
It worked, cheers mate.
|
excellent,
On a side note you could use CSS to make the textbox appear disabled: grey background, etc if you wish. |
All times are GMT -5. The time now is 03:38 AM. |