Hey!
So this is the third time ive come for help in 2 days and i feel bad :L So im more than understanding if people dont want to help me out!
Ive got this code:
Dentafrice helped me with some of it but i went on to play around alot with it and see what i could get out of it!!PHP Code:<?
session_start();
include ("config.php");
$username = $_SESSION['username'];
$logged = mysql_query("SELECT * FROM `users` WHERE `username`='$username'");
$logged = mysql_fetch_array($logged);
?>
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<?
if($logged["rank"] != "1") {
// not an admin.
exit("You need to be an administrator to view this feature"); // you can redirect to an error page, include something here, doesn't matter, just exit.
}
// aha.. they are an admin.. show the content.
include ("menus/anav.php")
?>
Now it doesnt work for some reason and nothing appears when logged in as rank 1 or any other ranks....
Can anyone help me!! THANKS
Edited by ReviewDude (Forum Moderator): Identical threads merged.






Reply With Quote


