The code is going to have to specify which user to select; otherwise, you're going to get unpredictable results.
Proxomos code modified to do so would look like:
Code:
$result = mysql_query("SELECT admin FROM users WHERE id=$user_id");
list($admin)=mysql_fetch_row($result);
switch ($admin){
case 0:
header("Location: members.php");
break;
case 1:
header("Location: admin.php");
break;
}
That's if you have a unique (primary key) field in your DB called "id" and have already declared the variable $user_id according to the login procedure to correspond to the current user. You'll need to change that part to match your field name.