I have to list menus in a form. Both list menus are created by a database. I need a user's input on one list menu to change the options in another list menu. Can someone help me?
$rows_affected = mysql_affected_rows($dbh);
if ($rows_affected > 0) {
$area = $area . "<label><select name='tour_id'><option>Hotel</option>" ;
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
$area = $area . "<option value='" . $row{'area'} . "'>" . $row{'area'} . "</option>";
}
$area = $area . "</select></label>" ;
}
$query = "SELECT hotel, tour_id FROM concierge_program ";
$result = mysql_query($query);
$rows_affected = mysql_affected_rows($dbh);
if ($rows_affected > 0) {
$hotel = $hotel . "<label><select name='tour_id'><option>Hotel</option>" ;
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
$hotel = $hotel . "<option value='" . $row{'tour_id'} . "'>" . $row{'hotel'} . "</option>";
}
$hotel = $hotel . "</select></label>" ;
}
?>