Re: Database value as selected in combo box!
[email protected] ("Anthony Judd") Sun, 2 Feb 2003 17:03:36 +1000
| Newsgroups | php.lang |
|---|---|
| Message-ID | <[email protected]> |
i have also tried:
function retrieve_category()
{
$cat = mysql_query("SELECT category_id FROM category");
while ($current_row = mysql_fetch_row($cat))
{
$row = $current_row[0]; //changed here
if ($row == $id)
{
printf("<option selected>%s</option>\n",$current_row[0]);
}
else
{
printf("<option>%s</option>\n",$current_row[0]);
}
}
}
>