SHARE
TWEET

Untitled

a guest May 21st, 2017 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $sql = "SELECT * FROM users WHERE username = $username AND password = $password";
  2. $result = mysql_query($sql);
  3. if (mysql_num_rows($result) > 0) {
  4.     //good username + password
  5.     $row = mysql_fetch_assoc($result);
  6.     if ($row['admin'] == 1) {
  7. echo '<a href=adm1n.php>Admin Page</a>';
  8.         //is admin
  9.     }
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top