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

Reply via email to