i have two select menus on my page, one for doctor services, and one for doctor names
<?php
mysql_connect('localhost','root');
mysql_select_db('Health');
$result = mysql_query("SELECT Service FROM services");
echo "<SELECT name=\"Services\">\n";
echo "<OPTION value=\" \" selected> </OPTION>\n";
while($row = mysql_fetch_assoc($result)) {
echo "<OPTION value=\"{$row['Service']}\">{$row['Service']}</OPTION>\n";
}
echo "</SELECT>\n";
?>
thats the service one and the doctor is pretty much the same. what i want to do is once a value is selected in the services menu, the database is checked to see what doctors perform that service, and then loads a list in the second menu of the doctor names.
ive got it to work using a button that performs a function
if ($load) {
$Service = $Services;
}
which loads the doctor names. but i dont really want to use a button. id like it so that once a service is chosen, the doctor names load automatically. is this possible, and if so, how would i do that?
thanks
mark