Hi
I have a drop dynamic down menu generated from a database.
I would like to add a default "Please select" option when the menu is originally shown.
I do not need to reset the value back to dault as the page is directed to another page
when the form is submitted.
PHP Code fore dropdown menu -
$query_staff_list = "SELECT * FROM computers ORDER BY name ASC";
$staff_list = mysql_query($query_staff_list, $abe) or die(mysql_error());
$row_staff_list = mysql_fetch_assoc($staff_list);
$totalRows_staff_list = mysql_num_rows($staff_list);
<select name="name" id="name">
<?php
do {
?>
<option value="<?php echo $row_staff_list['name']?>"><?php echo $row_staff_list['name']?></option>
<?php
} while ($row_staff_list = mysql_fetch_assoc($staff_list));
$rows = mysql_num_rows($staff_list);
if($rows > 0) {
mysql_data_seek($staff_list, 0);
$row_staff_list = mysql_fetch_assoc($staff_list);
}
[/SIZE]