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"); Quote Link to comment Share on other sites More sharing options...
schilly Posted January 27, 2010 Share Posted January 27, 2010 did you write a session class? Quote Link to comment 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 Quote Link to comment 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"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.