once the user select's a car make from the combo box another combo box becomes visible and displays it .so if I select Ford from the first combo box the second combo box appears and displays Mustang etc..
this is the code of getting value from database and assigning it to combo box
<? include("connection.php") ?>
<?
$query_dispMake="SELECT make FROM car ORDER BY make";
$result_dispMake=mysql_query($query_dispMake);
echo "<select name=\"select\">\n";
while($query_data = mysql_fetch_array($result_dispMake)){
echo"<option>{$query_data['make']}</option>";
}
$query_dispMake2="SELECT DISTINCT model FROM car ORDER BY model";
$result_dispMake2=mysql_query($query_dispMake2);
echo "<select name=\"second\">\n";
while($query_data = mysql_fetch_array($result_dispMake2)){
echo"<option>{$query_data['model']}</option>";
}
?>

New Topic/Question
Reply




MultiQuote






|