EllisLab text mark
Advanced Search
     
Hi all
Posted: 07 August 2012 07:45 AM
Joined: 2012-08-07
1 posts

Am working on project in which i have a registration form for users, there are two drop down menus , one for selecting state, and other for cities(districts), I have two tables in my database called states and districts, and the dropdowns should be dynamic.

what i need is when i select a particular state, the corresponding districts should be there in the second dropdown.

in database in district table i have Stateid as foreign key

please help me.
thank u .

 
Posted: 07 August 2012 12:13 PM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1444 posts

If you take a look at community auth, it has an example to auto populate dropdowns.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application