Hi having problems with drop down menus again!!! thanks to TTT for supplying the original code but im having different problems if i have more than one select drop downs on one page, im sure its a simple problem but i cant see why...On a second drop down menu then options are blank. Can anyone help Cheers
<select name="PAtleast50perc">
<?
$option_str = "";
while($rs = mysql_fetch_row($result5)) {
if ($rs[1]==$row2[PAtleast50perc]) {
$selectedA = 1;
$sel = "SELECTED";
} else {
$sel = "";
}
// choice = rs[1]
$option_str = $option_str."<option value='".$rs[1]."' ". $sel.">".$rs[1]."</option>";
}
if(!isset($selectedA)) {
$option_str = "<option value='0' SELECTED>...</option>".$option_str;
}
echo $option_str;
?>
</select>
This is my query for pulling out the drop down menu list
$query5 = "select Code, Choice from CHOICE order by Choice";
$result5 = mysql_query($query5);
$number = mysql_numrows($result5);
I have found if i repeat this query and replace the 5 with a 6 the drop downs will work if i make the change?????
This is long winded any ideas anyone