I have the following code to generate a dropdown list.
$query = "SELECT * FROM firm";
// Execute it, or return the error message if there's a problem.
$result = mysql_query($query) or die(mysql_error());
$dropdown = "<select name='name'>";
while($row = mysql_fetch_assoc($result))
$dropdown .= "\r\n<option value='{$row['name']}'>{$row['name']}</option>";
$dropdown .= "\r\n</select>";
How can i modify this code to make a 2nd dropdown based on the value selected in the above drop down.
What i am trying to achieve is that you can firstly select a firm as above, then secondly i want to be able to choose between the different areas for that specific firm. All this information is in one table.
Is it possible to modify this code.