Hi,
There are two approaches to this:
You get every combination of ddm1 and ddm2 from your database, and return there in a javascript array/xml objects and load the second select list after the first has been loaded using a javascript (Search this forum for populate, and you will find lots of ideas).
This gives problems when
- The user has java switched off
- You have a lot of potential combiations
The other is:
You select from the dop-down menu.
You submit the page to itself, and do a query on the database for the secons ddm2.
$result = mysql_query("Select ddm2 from database where ddm1= '$ddm1'");
while ($row = mysql_fetch_array($result))
{
$option .= "<option value=\"$row[ddm2]\">
";
}
echo "<select name=\"ddm2\">";
echo $option;
echo "</select>";
J.