benjahnee Posted March 24, 2013 Share Posted March 24, 2013 when there is a user logged in they should be directed to members.php but even when logged in i get redirected to login.php instead of members.php, how do i fix this? im new aswell so try and make it simple for me <?phprequire('connect.php');$sesuser = @$_SESSION['username'];$username = @$_POST['username'];$password = @$_POST['password'];$submit = @$_POST['submit'];if ($sesuser){header( 'Location: members.php' ) ;} else {header( 'Location: login.php' ) ;}?> Quote Link to comment https://forums.phpfreaks.com/topic/276101-php-script-redirecting-problem/ Share on other sites More sharing options...
PaulRyan Posted March 24, 2013 Share Posted March 24, 2013 You need to post all of your code, posting a snippet doesn't really help us gauge the problem. Quote Link to comment https://forums.phpfreaks.com/topic/276101-php-script-redirecting-problem/#findComment-1420798 Share on other sites More sharing options...
haku Posted March 25, 2013 Share Posted March 25, 2013 Also, please wrap your code in code tags. You can do this using the <> button in the editor. Quote Link to comment https://forums.phpfreaks.com/topic/276101-php-script-redirecting-problem/#findComment-1420827 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.