mike karthauser wrote:


Once i have selected from the drop box the variable is submitted back to my
table and saved.

When re-edit the data - the record already has a value for catcode which i
want to reflect within the drop box - in html it would be the addition of
selected="selected" within the .

Are there any recommended methods of doing this?

I'd change the following:
> printf("<option value=\"%s\">%s</option>\n", $myrow["catcode"],
$myrow["title"]);

into this:
$l=$myrow['catcode'];
?><option value="<?=$l;?>"<?=($catcode==$l)?' selected="selected"':"";?>><?=$myrow['cattitle'];?></option><?

--
Kae Verens _______\_ webworks.ie
work: www.webworks.ie _____\\__ webhosts
play: www.contactjuggling.org ___\\\___ design
kae: kverens.contactjuggling.org _\\\\____ code


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



Reply via email to