...

View Full Version : Disabled input don't pass variable



Lotem4Ever
05-06-2009, 08:20 AM
I wanted to create a form to update stored info on the DB.
Since I wanted some of the things to not be changed I set the input of them as disabled.
The thing is, as it's disabled, the PHP doesn't recognize it's variable.

abduraooft
05-06-2009, 08:34 AM
Since I wanted some of the things to not be changed I set the input of them as disabled.
The thing is, as it's disabled, the PHP doesn't recognize it's variable. form doesn't submit the disabled input controls. However you may use readonly attribute, if it suits for your needs.

In fact, there is nothing hidden/readonly when it comes in the client side. Users can easily manipulate the client side source code. So, you must always validate all external data, before using them at server side.

Lotem4Ever
05-06-2009, 09:20 AM
form doesn't submit the disabled input controls. However you may use readonly attribute, if it suits for your needs.

In fact, there is nothing hidden/readonly when it comes in the client side. Users can easily manipulate the client side source code. So, you must always validate all external data, before using them at server side.

Ok, thank you.
I'll do what you said. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum