list of first drop down menu get from database mysql, and list of second drop down menu is according category what first drop down menu select. example case: we have two drop down menu. first list (funny, action,drama). when i select funny, list of second drop down menu dinamically display all title funny movie. How? THANK YOU for all

Hi,

you have to use javascript for this issue.
1)
for your first dropdown you must have something like"
<select name="ddlType" onChange="pageRedirect(this.value)">

you have to build your javascript function to redirect you to the same page but with a new parametter (let call it type). you take the type value ($_GET["type"]) and populate the second drop down.

2)
you can build 2 arrays, one for first dropdown and one (actually will be an array of arrays) for the second dropdown. this way you don't have to interogate the database for every change.

3)
use AJAX

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.