As PHP generates the HTML for the browser, you will make 'decisions' about which page; based on the user.
Either the user details are retrieved from a database or dynamically (during this session) you have made a decision about this user as to which page(s) they will see.
Build a global array of the "types" of users and related pages.
Then when you create the hyperlink - in PHP code - just add the "href" value based on the current "UserType" (which I would include as a session variable). Something like this:
Code:
<a href="<?php echo $usertype[$current_user_type][0]; ?>" target="parent">HOME</a>
This assumes you have the global array of user types (one element for each *different* user) and pages. For example:
Code:
<?php
$usertype["basic"][0] = "home1.php";
$usertype["basic"[1] = "links1.php";
$usertype["advanced"][0] = "home2.php";
$usertype["advanced"][1] = "links2.php";
$usertype["novice"][0] = "home3.php";
$usertype["novice"][1] = "links3.php";
?>
I think you get the idea. Your actual variable names and page names will, likely, be different.
=====================================================================
Another - simple - approach would be to encode the pagenames IN the session (group) value. Like this:
Code:
<a href="home<?php echo session['user_group']; ?>.php">Home</a>
You then create pages
- homebasic.php
- homeadvanced.php
- homenovice.php
Or some variation on this idea.
Bookmarks