hallo there. My english arent quite good so excuse me in advance
i have a form. This form contains a select and some textareas. i get data from a database to fill in the select. This is the code:
echo "<form method=post name=f1 action='bathmoi-ins.php'>";
$quer=mysql_query("SELECT member_id, lastname, firstname, fathersname FROM members where tmima='$cat' order by lastname");
echo "<p align='center'><font size='2' face='verdana'>choose the student:";
echo "<br><br>";
echo "<select name='subcat' size='20'>";
while($noticia = mysql_fetch_array($quer)) {
echo "<option value='$noticia[member_id]'>$noticia[lastname], $noticia[firstname], $noticia[fathersname] </option>";
}
echo "</select>";
....
The concept is to choose a student from the select (on change) and get the selection value in order to show the students photograph (into a div or not). (i must get the selected value in order to communicate with the database to get the photo s url)
Be aware that i dont want to sudmit the form. The form on sudmition inserts into the same database data the user inserted into the textareas i mentioned.
i am not sure what i should do. i know that i have to call a javascript?? function on change. But how in that function can i communicate with the database in order to get the photos url in order to show that photo. If you can think of another way to accomplish something like that please inform me....