1) List of countries on the web form, How? 2) Any one with the book "Building your own database driven…
1) How can I easily have a drop down menu for the list of coutries on the web form other than typing them one by one?
2) Any one with the book "Building your own database driven websites using php & MySQL" or similar?
please assit if you have, got to finish my project.
Tagged with: amp • coutries • database driven websites • drop down menu
Filed under: Building Websites
Like this post? Subscribe to my RSS feed and get loads more!



http://codesnippets.joyent.com/posts/show/663 has the code for a country drop down list.
I recommend also adding the most common countries at the top of the list (ie. US, UK, Australia, etc.)
Then, put "<option value=""> </option>" to put a break.
If you ask a specific question about php and mysql, I can help you out.
<select name="country" id="country">
<option value="full name or 2 letter abbr." >country 1</option>
<option value="full name or 2 letter abbr." >country 2</option>
<option value="full name or 2 letter abbr." >country 3</option>
</select>
The name is for passing to some other form (considering your second q was about php). Id is for styling.
Value is what gets passed into your post array in php.
As far as not having to get a list, find some phpbb or similar, go through the registration process until you can select country, then view source. If you do this from an open source project, you dont have to worry about copyright.
Your second question isn’t answerable from what I can tell.