SHARE
TWEET

Untitled

a guest May 21st, 2017 109 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.         //is admin
  8.     }
  9. }
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