Drop down menu
Hi there,
I have set up dd menus to select headings to search. Each dd searches based on District, province or institution. When I ran DA, it only properly sorted the the first drop down so I made recordsets for the remaining two DD menus.
It works fine except for one thing. The DD menus do not default to "Please Select", it defaults to the first item in the database. Is there a way to stop this so it defaults to seeing "Please select"?
The DD menu code example:
<select name="S_District" id="S_District">
<option value="" <?php if (!(strcmp("", $row_WADAcheflist["District"]))) {echo "selected=\"selected\"";} ?>>Please Select</option>
<?php
do {
?>
<option value="<?php echo $row_rsDistrict['District']?>"<?php if (!(strcmp($row_rsDistrict['District'], $row_WADAcheflist["District"]))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsDistrict['District']?></option>
<?php
} while ($row_rsDistrict = mysql_fetch_assoc($rsDistrict));
$rows = mysql_num_rows($rsDistrict);
if($rows > 0) {
mysql_data_seek($rsDistrict, 0);
$row_rsDistrict = mysql_fetch_assoc($rsDistrict);
}
?>
</select>
Any assistance will be appreciated