Snooble Posted February 1, 2007 Share Posted February 1, 2007 <?php include 'sessionstartandsql.php'; if(isset($_SESSION['myemail'])){ header(Location:purchase.php); } else{ header(Location:login.php); } ?> i get a blank page. What's wrong? Snooble Quote Link to comment https://forums.phpfreaks.com/topic/36675-solved-what-am-i-doing-wrong-small-script/ Share on other sites More sharing options...
Balmung-San Posted February 1, 2007 Share Posted February 1, 2007 Put quotes around the Location:'s. i.e., header("Location: purchase.php") header() takes in a string as an argument. Quote Link to comment https://forums.phpfreaks.com/topic/36675-solved-what-am-i-doing-wrong-small-script/#findComment-174837 Share on other sites More sharing options...
wildteen88 Posted February 1, 2007 Share Posted February 1, 2007 Make sure sessionstartandsql.php is not outputting anything either. Otherwise the headers will fail to work and you'll either get a blank page or a headers already sent error message. Quote Link to comment https://forums.phpfreaks.com/topic/36675-solved-what-am-i-doing-wrong-small-script/#findComment-174850 Share on other sites More sharing options...
Snooble Posted February 1, 2007 Author Share Posted February 1, 2007 thank you very much. First suggestion worked. But second suggestion will help in the future. Thank you Snooble Quote Link to comment https://forums.phpfreaks.com/topic/36675-solved-what-am-i-doing-wrong-small-script/#findComment-174855 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.