i have a table in Mysql's database, tblStudents, which has 1,000 stdents, from different departments, e.g 500 from IIT, 300 from IMS, 100 from Medical, 100 from Engineering.

and on fornt end in, i have 2 dropdown boxes, one drpdwnDown box is filled with values, IMS, IIT, MEDICAL, ENGINEERING. now i want to fill 2nd dropdown box on basis of 1st drop down box selection mean if i click IMS from 1st dropdown box then 2nd dropdown box should be filled with all students roll no., from IMS or if i click IIT then 2nd dropdown box should be filled with all students' roll no.s from IIT,
from database it should pck value.

i spent 2 days on it but couldn't solve it, plz help me with it

PHP, MYSQL, HTML

wheres your code, its hard to fix something we cant see

...

you should have a query to the student table where the WHERE clause match the 1st table variable you previously queried, then use the variable to add the student in the select drop list option name.

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.