justmelat
asked on
Populate a combo/drop box with mySql data
I have a drop box on one of my php forms. How do I populate that combo box with the selected column from my database. Say I have a tbl of names and addresses and I want one of my drop boxes to display all the names so my user can select one or two of them - how can I accomplish that? Another wrinkle - when I open this form (which will pull the data for a specific record), I want the combo box to display the name of the person associated with that record. I currently have some of the names hardcoded into the form and as you know, it will refresh each time the php page is opened and just display the first name in the list. Help :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
echo " selected";
I took it out by mistake and it took forever to figure out what was wrong.
Thanks alot snoyes_jw for your help.