php, javascript and db - your help is needed

From: Date: Sun, 18 Jul 2004 16:30:49 +0000
Subject: php, javascript and db - your help is needed
Groups: php.db 
Request: Send a blank email to php-db+get-35345@lists.php.net to get a copy of this message
Hello, I have a HTML form with 2 select boxes, lets say students and courses. When the from loads for the first time, I fill the students select box with data from database. The courses selectbox remains empty. When the user selects a value from the students selectbox (onchange event), I should go to the db to reterive the courses for the selected student and fill the courses selectbaox. I found it very complicated to do the interaction between javascript and php: apparently, I have to submit the from for the selected student id to be passed as a parameter to php (so that php can access the db with the student id and retrieve his courses), and at the same time I want the form to stay with the list of students, and the selected student. This should not be that hard, should it?! this is something trivial, I hope? I also tried using cookies, with no success. If someone knows how to do that, please let me know. Best Regards, G. Cohen

« previous php.db (#35345) next »