ADminstration

A

Anonymous

Guest
how to restrict the users from not allowing to access the admin privilages using php?
 
Thanks egami,

the privilages has been developed but when directly accessing from the url it will be going to admin privilages


ex: if we have an admin privilage like Remove.php is the option for admin . But the user run the same file it will opening for the user also . So how restrict the user from redirecting..
 
if ($_SESSION['userlevel'] < 100) {
die("You do not have access to this page.");
}
 
Thanks egami,

i have tried that one also .it is working in the localhost but it is not working in the live site.
 
make sure that session_start() is at the beginning of your script.
 
Thank you

the script has been kept before starting of the page
i given userlevel=1,adminlevel=5, though also using user level accessing the admin pages
by chagnging the url..
 
Back
Top