Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sql = "SELECT * FROM users WHERE username = $username AND password = $password";
- $result = mysql_query($sql);
- if (mysql_num_rows($result) > 0) {
- //good username + password
- $row = mysql_fetch_assoc($result);
- if ($row['admin'] == 1) {
- echo '<a href=adm1n.php>Admin Page</a>';
- //is admin
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement