Date: 02/02/03
- Next message: Anthony Judd: "[PHP-WIN] Re: Selected Value!"
- Previous message: Pat Johnston: "[PHP-WIN] Re: Register globals on and off"
- Next in thread: Anthony Judd: "[PHP-WIN] Re: Selected Value!"
- Reply: Anthony Judd: "[PHP-WIN] Re: Selected Value!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I am trying to display the current database value as SELECTED in a combo
box. Any ideas why this isn't working. (ID is being sent)
Any help is appreciated..!
function retrieve_category()
{
$cat = mysql_query("SELECT category_id FROM category");
while ($current_row = mysql_fetch_row($cat))
{
if ($current_row[0] == $id)
{
printf("<option selected>%s</option>\n",$current_row[0]);
}
else
{
printf("<option>%s</option>\n",$current_row[0]);
}
}
}
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Anthony Judd: "[PHP-WIN] Re: Selected Value!"
- Previous message: Pat Johnston: "[PHP-WIN] Re: Register globals on and off"
- Next in thread: Anthony Judd: "[PHP-WIN] Re: Selected Value!"
- Reply: Anthony Judd: "[PHP-WIN] Re: Selected Value!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

