ab4net, thanks for the info, but I think that way would create too much data redundancy because I do have a lot of other fields in my table_user like email, url, etc. My search form uses an array for the music genre search selection, like this...
echo "<td><input type=\"checkbox\" name=\"mid[]\" value=\"$mid\">$genre</td>";
so this is what i came up with so far:
if (isset($mid[0])) {
$result = mysql_query("SELECT uid FROM table_music_relations WHERE mid IN ('" . implode("','", $mid) . "')");
while (list($uid) = mysql_fetch_row($result)) {
$result2 = mysql_query("SELECT uname FROM table_user WHERE uid='$uid'");
list($uname) = sql_fetch_row($result2);
if (mysql_num_rows($result2) > 0) {
echo "$uname<br>";
} else { echo "No users found"; }
}
}
the problem with the code i have right now is that it echo's "No users found" for every user that doesn't match the search...