dynamic form help

From: Date: Wed, 22 Nov 2000 05:10:46 +0000
Subject: dynamic form help
Groups: php.general 
Request: Send a blank email to php-general+get-26581@lists.php.net to get a copy of this message
What would be the best way to do the following? I have a mysql db record, I have it so people can login against the db and now I want to allow them to edit the information about them in the db. The form they create their entry with is a combination of text boxes and drop-down selection menus. When they log in I want the form that comes up to have the values in it that they originally signed up with. I know how to populate the text box fields dynamicly with value=$var_name , but how can I make it so that the selection drop-down menus have what they selected? I essentially need to be able to write those parts of the form like this: drop-down: You have 3 choices, your current selection is...you can change it if you'd like and save it to the db: <SELECT> <OPTION>1</OPTION> <OPTION selected>2</OPTION> <OPTION>3</OPTION> </SELECT> how can I make it so that the 'selected' appears in the right place? and yet still include all the other options so they can change it if they want to? Thanks for any ideas. Jon

« previous php.general (#26581) next »