Greaser9780 Posted August 28, 2006 Share Posted August 28, 2006 I am running a checkuser.php with my login system. How can I direct them to the properpage in my login_success.php. I believe I understand what to do I just don't know which command to use to send them to the proper user level page. This is what I have now that doesn't work. I don't think include is the right statement. Can anyone point me in the right direction?<? session_start(); include 'welcome.php'; if($_SESSION['user_level'] == 0){ include 'user_level_0.html'; } if($_SESSION['user_level'] == 1){ include 'user_level1.php';} ?> Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted August 28, 2006 Share Posted August 28, 2006 use a header:[code]header("location: user_level1.php");[/code]Or you can ouput a meta refresh tag to the browser, or a javascript redirect to the browser. Quote Link to comment Share on other sites More sharing options...
Greaser9780 Posted August 28, 2006 Author Share Posted August 28, 2006 Eventually I will have about 8 different user levels. Can I just use HEADER to send them to the correct page? Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted August 28, 2006 Share Posted August 28, 2006 Yes.[code]if($_SESSION['user_level'] == 0){ header("location: user_level_0.html");}if($_SESSION['user_level'] == 1){ header("location: user_level1.php");} [/code] Quote Link to comment Share on other sites More sharing options...
Greaser9780 Posted August 28, 2006 Author Share Posted August 28, 2006 TYVM.I must say this is by far the most useful and friendly forum I think I have ever been a part of. 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.