I'm trying to separate some users (with admin rights) from others, so that they can view and enter some data that will be hidden from others in many consequent windows. My login page goes like this: if (isset($_POST['Submit'])) { $username = $_POST['username']; $password = $_POST['password']; $result = mysql_query("Select * From admin where username='$username'",$link); if(mysql_num_rows($result)>0) { $row = mysql_fetch_array($result, MYSQL_BOTH); if($password == $row["password"]) { $_SESSION['adminok'] = "ok"; $_SESSION['username'] = "username"; $_SESSION['password'] = "password"; header("Location: admin.php"); } else {$msg = "Password incorrect";} } else {$msg = "Username incorrect";} } ?> There's a row in the SQL table (admin_rights) that's either 0 or 1 (true/false). how can I pass this variable on to another php page to filter out some rows from other SQL tables, depending on this variable? I reckon it should go something like this: $clientsresult = mysql_query("Select * from clients",$link); $numcli = mysql_num_rows($clientsresult); $nc = 0; while($clients = mysql_fetch_array($clientsresult, MYSQL_BOTH)){ [b]if ($isadmin) {[/b] $nc++; $client[$clients['client_ID']] = $clients['name']; } } Well, this seems simple, but how shall I get the [b]$isadmin[/b] from login page? This is also simple I know :) but I'm having awsome trouble. Help please! Thanks.