BJ,

A simple "while" command should do it. Try something
like this:

print("<select name=artist>\n");
$qry = "SELECT artist_id, artist FROM $db";
$res = mysql_query($qry) or die(mysql_error());

while($data = mysql_fetch_array($res))
{
print("<option
value=\"$data[0]\">$data[1]</option>\n");
}
print("</option>");


That should do the trick for ya!

Best,

John



>I have two fields artist_id, artist.  How do I put
the contents of 
"artist" into a dropdown list.


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to