Q: Creating secondary dropdownlist based off first dropdown list pulled back from db using php I have managed to get the first db list working but I don't know how to go about making a secondary dropdown based off the first one.  Maybe a filtered version of the first dropdownlist?  Here's the code that I have so far:
<?php
require '/dbinfo/oracconnect.php';
include 'myfunctions.php';

if(isset($_POST['location'])) {

$loc_data = explode("|", $_POST['location']);

$mo_in_out = array();
$mo_in_out = getMOs($loc_data[0]);

echo "Movement Orders for ".$loc_data[1]."</br><table border='1'>";
echo "<tr><td>Target</td><td>Source</td></tr>";
$i = sizeof($mo_in_out);
$ii=0;
while($ii < $i)
{
    echo"<tr><td>". $mo_in_out[$ii] ."</td><td>".$mo_in_out[$ii+1]."</td></tr>";
    $ii = $ii + 2;
}
echo "</table>";

if (isStorage($loc_data[0]) == 1){  
    echo "Unique SKU count: ".countUnique($loc_data[0]) . "for ".$loc_data[1];  //calls a function countUnique() - useful to use functions as they can be reused and used between pages
    echo "</br>". "Empties:" .emptyLUs($loc_data[0]);
    $filldata = fillperc($loc_data[1]);
    echo "</br>Fill:" . $filldata[3] ."%";
    echo "</br>Total Locations:" . $filldata[1];
    $coMo = completeMO($loc_data[1]);
    echo "</br>Complete MO's". $coMo[0];
}

echo"</br></br>";
}

else{  // display this stuff if button hasn't been clicked.

$conn = prod_conn();

$loc = array();
$loc = getLocations();
$i = $i = sizeof($loc);

?>
<html>
<img src="header.jpg" alt="SSI Schaefer logo"      style="width:1580px;height:50px;"><head><B>Impact Assessment Matrix</B></head>
<title>Impact Assessment Matrix</title>
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">  

<p>
Select location.....

<?php

$ii = 0;
echo"<select name='location' id='location'>";   //     onchange='this.form.submit();'>"; // can be added to allow changing value to trigger data submission
echo"<option value=''>Select...</option>";
while($ii < $i)
{
echo"<option value='".$loc[$ii] ."|".$loc[$ii+1]."'>".$loc  [$ii+1]."</option>";
$ii = $ii + 2;
}
echo "</select>";
echo "<input type=\"button\" name=\"Results\" value=\"Results\"   onclick=\"this.form.submit();\"/>";
}
?>

</p>
</form>
</html>

This brings back the option list from the db but don't where to start when filtering this list into other dropdown lists.  Can anybody help please?
