[thelist] PHP Drop down lists

Jon Haworth lists at laughing-buddha.net
Tue Apr 26 04:02:03 CDT 2005


Hi Albert, 

> I want to create a drop-down list, where you select a country 
> from a list. I want to populate this list, manually

ISO country codes:
http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html

Should take all of 2 mins to turn that list into a <select>.

> and i want the user to be able to select a name from the list, 
> and it's value to be send to the database, so that when i look 
> at the request this user has put in, i should be able to see the 
> correct select he/she had selected.... 

Your form should submit to a script which handles this. 

Have a read of this (it assumes you're using MySQL):
http://www.zend.com/php/beginners/php101-8.php#Heading7

Cheers
Jon



More information about the thelist mailing list