Snooble Posted February 2, 2007 Share Posted February 2, 2007 Hey people: <?php if(!isset($_SESSION['myemail'])){ header("Location: login.php"); } ?> Is that where i place the !? I want to check if the session IS NOT set. If it's NOT SET then header to login.php. If IT IS SET then carry on loading the page. Thanks Snooble Quote Link to comment https://forums.phpfreaks.com/topic/36802-a-little-checking-script/ Share on other sites More sharing options...
.josh Posted February 2, 2007 Share Posted February 2, 2007 yes, that's the correct place. Did you !try it before you asked? is it !"working?" Quote Link to comment https://forums.phpfreaks.com/topic/36802-a-little-checking-script/#findComment-175567 Share on other sites More sharing options...
Snooble Posted February 2, 2007 Author Share Posted February 2, 2007 no it's not working. It loads the page even if i'm not logged in. I ....... lol.. I just placed it before the <head> and <html> tags lol... Apologies for this waste of time. It works. Should have trusted myself in the first place, it's only too easy to ask for help. Snooble Cheers Quote Link to comment https://forums.phpfreaks.com/topic/36802-a-little-checking-script/#findComment-175575 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.