Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error());
- while($info = mysql_fetch_array( $check ))
- {
- //if the cookie has the wrong password, they are taken to the login page
- if ($password != $info['password'])
- { header("Location: login_test.php");
- }
- //otherwise they are shown the admin area
- else
- {
- echo "Admin Area<p>";
- echo "Your Content<p>";
- echo "<a href=logout.php>Logout</a>";
- }
- }
- }
- else
- //if the cookie does not exist, they are taken to the login screen
- {
- header("Location: login_test.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement