Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cleaner Country and States For Forms

Status
Not open for further replies.

Shanksta

Technical User
Joined
Jun 28, 2002
Messages
96
Location
US
Hi everyone -

I am fairly new to PHP. When I create a form for registration I have a huge list for countries and states, each with its code in the value field.

When users go to edit their address I want to initially select the state and country they selected, I have dont this in the past by drawing the info drom the database with an if statement.

My question is, when you create forms for your sites, do you have countries and states taken from a db or are they there in the html - I would love to have it in the db but I always think of queries of slowing down everything and it would also be VERY time consuming.

Just wondering what your thoughts on the matter are.
 
The vales are taken from a db (or a serial file) and are used to create HTML, there are no country names in HTML.
You could put the names of the countries (or even the entire html "box") in an include file as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top