Reputation:
How can i populate the values in the drop down(second drop down) from the select query on choosing the option from the first drop down ?
Examples: First Drop Down : Listing out all the "department name" using select query. Second Drop Down : Now, i need the output to list out all the "professors name" in the respective departments on the basis of the first drop down option.
Thanks in advance. Much Appreciated your help.
Upvotes: 0
Views: 1419
Reputation: 1024
You could easily accomplish this with JavaScript: http://javascript.about.com/library/bl3drop.htm
This essentially uses if-then statements to output the latter dropdown lists with options dependent on the first. If you're looking more for PHP and Ajax (for dynamic lists from a database), this is a similar question: [link]
Upvotes: 2