if i understand correctly, you want to make a dropdown box with the names of the artists and when they select the artist, you want the artist id in the database to pase to the next page. Now, i would approch this problem a different way. Seeing that you will probably need to make this dropdown box again on several pages first thing would be to make a function so you can just quickly set on up on the fly. Second thing is to visualize the html you want to output. From what im guessing this is how you would want it to look like:
<form action='target.php' method='post'>
<input type='hidden' name='action' value='search'>
<select name='artistid'>
<option value='1' selected>Blink 182</option>
<option value='2'>Incubus</option>
<option value='3'>Aerosmith</option>
<bla bla bla...>
</select>
<br><input type='submit' value='Find'>
</form>
so the php will look like this: (now im only maken a function thats gona make the <select> part of the form, the actuall setting up of the form you gotta do, but just follow along
function makedropbox ($title, $name, $tablename, $rowname, $default=-1, $size=0, $selected=-1)
{
//im assuming you have the database set up and everything
echo "<tr valign='top'>\n<td><p>$title</p></td>\n<td><p><select name=\"$name\" size=\"$size\">\n";
$tablenameid = $tablename."id";
//I dont know how you set up your database but i like to have the id key the same name as my table name, like if my table is called mp3list my id row would be called mp3listid
$result=mysql_query("SELECT $rowname, $rownameid FROM $tablename");
if($default != -1)
echo "<option value=\"$default\">$default</option>\n";
while ($currow=mysql_fetch_array($result)) {
if($selected == $currow[$tablenameid])
echo "<option value=\"$currow[$tablenameid]\" selected>$currow[$rowname]</option>\n";
else
echo "<option value=\"$currow[$tablenameid]\">$currow[$rowname]</option>\n";
}
echo "</select>";
}
now all you have to do is call the function and your whole drop box should be set up. This function is made to be inserted into a table btw, you can easily fix that by taken out all the table html in the first line of the function. So an example use would be this:
<form action='target.php' method='post'>
<input type='hidden' name='action' value='search'>
<?
makedropbox('Select Your Artist','artistid','mp3artist','artist','','','3');
?>
<br><input type='submit' value='Find'>
</form>
If you have problems, post back, since i didnt to any kinda test run through with this there might be bugs...sorry if there are but it gives you a general idea. Hope this helps.