hello -
i'm using a select statement and its not setting the selected value from the menu.
i've tried to echo the id for the selected item but its just coming back as the first record in the list.
i.e. menu - resume -
- calendar -
- phone book -
when i select calendar it still show record set resume was selected.
thanks for your help in advance.
theo werntz
i'm using a select statement and its not setting the selected value from the menu.
i've tried to echo the id for the selected item but its just coming back as the first record in the list.
i.e. menu - resume -
- calendar -
- phone book -
when i select calendar it still show record set resume was selected.
thanks for your help in advance.
theo werntz
Code:
<td>Select file to Upload to: <?php echo $row_file['id'] ; ?><select name="fileid" id="fileid" >
<?php
do {
?>
<option value="<?php echo $row_file['Id']?>"<?php if (!(strcmp($row_file['Id'], $row_file['Id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_file['file']?></option>
<?php
} while ($row_file = mysql_fetch_assoc($file));
$rows = mysql_num_rows($file);
if($rows > 0) {
mysql_data_seek($file, 0);
$row_file = mysql_fetch_assoc($file);
}
?>
</select>
Comment