CodeIgniter Forums

Full Version: dropdown 1 selection populates dropdown 2?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

i have 2 drop down menus. the first drop down is a list of districts. the second are schools. if a district is selected, i'd like the schools that belong to that district populate the 2nd drop down. here's how my db looks like

district table

school table

so the relationship is district.district_id = school.district_id. before MVC i used jquery and passed the IDs through the querystring and used $(.get). i know how to set up the models but how do i get the controller to work? i'd like this to be in one form on one page.

El Forum

use AJAX on this one if you dont want a page refresh. or could just use simple php.