Knowledgebase
HTML SELECT form default selected
Posted by netfreak, 12-26-2007, 02:30 AM | So here's my problem... I need to auto fill a drop down menu using the value from a PHP variable. The variable contains the actual number of the option. I haven't seen a way to add the value into the SELECT tag to set the default selected option, only adding the "selected" into the individual OPTION tag... Is there a way around this? Or, is there another method I should be using?
|
Posted by activelobby4u, 12-26-2007, 03:29 AM | may be u must employ a mysql database and do a condition check to list the select box with default selected
|
Posted by berumelu, 12-26-2007, 03:53 PM | No, you only have to use "selected" within OPTION tag. There is not another trick to work around.
Regards,
Luis Berumen
|
|
Add to Favourites
Print this Article |
Also Read