...

View Full Version : Drop Down Box Help



benni
02-17-2005, 11:46 AM
Hello,

I am getting the user to select items from a drop down box, then it is being validated in a php script, if the validation fails, the form is redisplayed, BUT i can not make the item in the drop down box they user previously selected come up as the selected item.

Pls could someone note down the code i ned to make this possible, cheers.

ronaldb66
02-17-2005, 12:09 PM
Use your form handler script to serve up a slightly changed version of the form, with this attribute:

selected="selected" added to the chosen option.
(The seemingly double specification might look silly, but this is the correct way for XHTML and doesn't hurt HTML)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum