Iam new here and need your help please!
Iam working with a php, mysql program, In this program I have let's say 3 combo box (select tags)
one for student_id , one for first name and the other for last name,
I already got data from mysql using( select from student) and put them in these combos, but I need onchange of each one to execute another select statement (for example if we change first name select from student where firstname=....), so I need to clear the other combos and refill them again according to the new query. so, I'll obtain all the students whose first name=...
here we need to call a function that makes combo clear using javascript (form1.fn.options.length=0) and also execute a new query(select * from student where fn=..) and refill combos again(new option(....))
my questions are:
1. do I need to call php function or javascript function onchange of select tag and if php how can i do that?
2.how can we take form variables (value of select) and put them in sql statement?
if any have idea about this please help me because I am lost and I dont know what to do.