populating drop down list and using the selected command to select item
Hi I have a drop down list being populated by a mysql table, the dropdown list works fine with read and update but on the edit page I would like to have the mysql stored id to be selected in the drop down list.
I have the following code but I can not get the item to be selected? I think it is because I have not coded the if statement correctly,
<select name="stand_id">
<?php
$stand_set = getall_stands();
while ($stands = mysql_fetch_array ($stand_set) ) { ?>
<?php if (isset($_POST['stand_id']) == $url_show ['stand_id']) echo 'selected="selected
"'; ?>
<option value=" <?php echo $stands ['stand_id']; ?>"
><?php echo $stands ['stand_descrip']; ?></option>
<?php } ?> </select>
Any help would be really appreciated
