bullbreed Posted January 27, 2010 Share Posted January 27, 2010 Have I wrote this the right way? if(!$session->isAdmin() || (!$session->isUser())){ header("Status: 200"); header("Location: index.php?denied=true"); Link to comment https://forums.phpfreaks.com/topic/190033-checking-sessions/ Share on other sites More sharing options...
schilly Posted January 27, 2010 Share Posted January 27, 2010 did you write a session class? Link to comment https://forums.phpfreaks.com/topic/190033-checking-sessions/#findComment-1002579 Share on other sites More sharing options...
bullbreed Posted January 27, 2010 Author Share Posted January 27, 2010 Yes I think so. I have 3 users. Admin User Guest When I have a page that is Admin only I write if(!$session->isAdmin()){ header("Status: 200"); header("Location: index.php?denied=true"); But I have one that is admin and user and havent done this before so was wondering if I had written in correctly and in the right order Link to comment https://forums.phpfreaks.com/topic/190033-checking-sessions/#findComment-1002583 Share on other sites More sharing options...
bullbreed Posted January 27, 2010 Author Share Posted January 27, 2010 Sorted it. I wrote another one like this if(!$session->logged_in){ header("Status: 200"); header("Location: index.php?denied=true"); Link to comment https://forums.phpfreaks.com/topic/190033-checking-sessions/#findComment-1002585 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.