View Single Post
  #10  
Old December 12th, 2007, 10:50 PM
Buzz Buzz is offline
Cyber Tech Help Moderator
 
Join Date: Sep 2000
O/S: MacOS
Location: Oregon, USA
Posts: 4,005
You can use the same thing in a cookie..

PHP Code:
setcookie ('user',  'authorized'time()+36000); 
then check for the cookie in the admin areas

PHP Code:
if($_COOKIE['user'] != 'authorized') {
    echo 
'You are not authorized for this area!';
        
header("Location: index.php");
        exit();
   } 
You will need some sort of login script to set the cookie however. I'm uncertain how you were determining when to set the session.
Reply With Quote