Populating Combo from db

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dumlee
Forum Commoner
Posts: 33
Joined: Mon Jun 30, 2008 12:06 am

Populating Combo from db

Post by dumlee »

I am having countries stored in db and want to show it to user in combo.

Please help.

After user selects country corresponding states should be shown in other combo.

Pls help
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Populating Combo from db

Post by califdon »

dumlee wrote:I am having countries stored in db and want to show it to user in combo.

Please help.

After user selects country corresponding states should be shown in other combo.

Pls help
This is known as "cascading" dropdown lists. You will find many references if you use those as search terms in a web search engine. Here's one such reference:
http://forums.digitalpoint.com/showthread.php?t=703846
User avatar
EverLearning
Forum Contributor
Posts: 282
Joined: Sat Feb 23, 2008 3:49 am
Location: Niš, Serbia

Re: Populating Combo from db

Post by EverLearning »

Take a look at the following link:

Chained selects
Chained Selects lets you "chain" multiple form select lists together so that the selection in a "parent" list can tailor the options available in a "child" list. Chained Selects supports unlimited number of form select lists in a "chain", as well as unlimited number of "chains" in a page.
Post Reply