Hi
I've created a form on my webpage which contains a dropdown menu of vehicle types. When the user selects a vehicle type e.g. car and selects go a script file runs that should return all available tyres for that car type.
At the moment all I can get the script file to do is return all values from the table 'tyre' in mysql.
Can anyone help me so that the query returns all values for the vehicle the user selects?
Any help would be appreciated.
Here is the script code
$result = mysql_query("SELECT * FROM $table")
or die(mysql_error());
echo "<table border='1'>";
echo "<tr> <th>Vehicle</th> <th>Description</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['Vehicle'];
echo "</td><td>";
echo $row['Description'];
echo "</td></tr>";
}
echo "</table>";
?>