SkyRanger Posted May 9, 2007 Share Posted May 9, 2007 Not sure why my pages are not redirecting, getting a white page: This works: include "../include/session.php"; if($session->logged_in){ $loggedin = $session->username; ---PHP Code here--- } else { header("Location: http://www.prodcoscripts.com"); } This does not work: include "../include/session.php"; if($session->logged_in) if($session-> userlevel >= 4 && $session-> userlevel <= 9) { $loggedin = $session->username; ---PHP Code here--- } else { header("Location: http://www.prodcoscripts.com"); } Quote Link to comment https://forums.phpfreaks.com/topic/50586-solved-header-redirect-problem/ Share on other sites More sharing options...
otuatail Posted May 9, 2007 Share Posted May 9, 2007 if($session->logged_in -> is a C pointer not used here in php if ($_SESSION['logged_in'] == '') $loggedin = $_SESSION{'username']; Quote Link to comment https://forums.phpfreaks.com/topic/50586-solved-header-redirect-problem/#findComment-248663 Share on other sites More sharing options...
SkyRanger Posted May 9, 2007 Author Share Posted May 9, 2007 Awesome, it works, thanks otuatail. Never even thought of it. Quote Link to comment https://forums.phpfreaks.com/topic/50586-solved-header-redirect-problem/#findComment-248671 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.