hi and thank you,
is there a reason this will not work? i am trying to echo an option that has already been selected in a list menu. best, addison

<select name="property">
$obj = mysql_db_query($dbname,"select * from ads where id=$id;");
while($row = mysql_fetch_object($obj))
if ($row->property_type == $row->id)
$selected = "SELECTED";
} else {
$selected = "";
<option value="<? echo $row->id; ?>" <? echo $selected; ?> selected>
<? echo $row->property_type; ?>
<option value="house">house</option>
<option value="condo">condo</option>
<option value="duplex">duplex</option>
<option value="apartment">apartment</option>
<option value="land">land</option>
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
subsidiaries of small independent publishing co.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to