Hi all,
Firstly i would like to say hi to everyone as i am a newbee to this forum and going by the discussions i know i have come to the right place to resolve my problem.
I have just started using PHP, MYSQL, Databases etc and through someone elses hard work using their PHP script for a login with Admin features. Sadly the author last helped back in 2004 so i am looking for some help to update some of the code to get the function i require. Everything works fine but i would like to amend the code so that Users with Level 2 access can only access pages with Level 2 etc and Level 9 (admin) can access all levels from 0 to 9. Below is my code in my page........
<?
include("include/session.php");
?>
<html>
<title>Protected Page</title>
<?
/* User is not logged in */
if(!$session->logged_in){
?>
<body>
Insert HTML code here that says "You are not allowed to view this page"
</body>
<?
}
/* User is logged in */
else{
?>
<body>
Insert HTML code here that says "This is the protected page"
</body>
<?
}
?>
</html>
This works fine but will allow anyone who is logged in to access protected pages. I came accross this script....
if(!$session->userlevel == 2){<br>
echo "You are not allowed to view this page";<br>
I am unable to include this script as i keep getting errors.
Any help would be appreciated
Stuarty:queasy: