Might this be better?
print "<select name=category_selection>\n";
print "<option value=0>Select Category</option>"\n
//Query
$sql="SELECT DISTINCT CategoryName From Categories ORDER BY CategoryName";
$result=mysql_query($sql);
if ($result)
{
While($Category=mysql_fetch_array($result))
{
Print"<OPTION VALUE=\"$Category['auto']\">$Category['name']</option>\n";
}
mysql_free_result($result[$a]);
print "</select>\n";
}
Leonard.
www.phpna.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php