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';} ?> Link to comment https://forums.phpfreaks.com/topic/18936-send-to-a-different-page/ 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. Link to comment https://forums.phpfreaks.com/topic/18936-send-to-a-different-page/#findComment-81790 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? Link to comment https://forums.phpfreaks.com/topic/18936-send-to-a-different-page/#findComment-81792 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] Link to comment https://forums.phpfreaks.com/topic/18936-send-to-a-different-page/#findComment-81794 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. Link to comment https://forums.phpfreaks.com/topic/18936-send-to-a-different-page/#findComment-81911 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.