It does work for lists. If you're only picking a single value out of the select box all you do is print out the post variable with the list name. And another thing, you don't need to display error messages and put a foreach loop inside your while statement. It' s just a waste. mysql error and die should go after mysql_connect, mysql_select_db, and mysql_query where they're useful.
print $_POST['list']; // print out the select variable
while ($rand = mysql_fetch_row($rez)) { // While statement should look like this
print "<option value=\"$rand[0]\">$rand[0]</option>";
}
EDIT: On my first post i thought you were looking to retrieve multiple values from a select box so that's why i answered with $_POST['select_name'][0];