[thelist] PHP / MySQL User Login System

Andrew Forsberg andrew at thepander.co.nz
Wed Feb 27 21:25:00 CST 2002


>Is it possible to have all the links from my "home page" link back to the
>"home page" with a variable tagged on that defines which content to display
>and then get the home page to display the requested page instead of the home
>page?

Sorry, misread this option: yes you can do this, and in all sorts of
ways. Perhaps the simplest would be to use a switch on the home page:

// do your session stuff and authentication here

if ($authenticated) {
     switch ($page) {    // where $page is the page to display
     case "this_site":
         include '/whatever/whatever/whatever.php';
         break;
     case "another_site":
         include '/blah/blah/blah/blah.php';
         break;
// etc...
     default:
         include '/my/home/page.php';
         break;
     }    // end switch
} else {
     include '/my/home/page.php';
}

HTH
Andrew

--



More information about the thelist mailing list