Home › Forums › Back End › Controlling Navigation with PHP Depending on User? › Re: Controlling Navigation with PHP Depending on User?
Yeah that solution seems to be very logical. You might want to consider storing the variable in a PHP session, so that you can reuse it. The best way would be to have the logical expression (the if statement) on the login page, and then a variable is set that contains the path of the navigation, so…
$_SESSION[‘nav-path’] = “nav/nav1.php”;
$_SESSION[‘nav-path’] = “nav/nav2.php”;
And then when your user visits a page…
This solution will make it more manageable in the long run. Hope this helps.