I'm not sure what you mean by a "master" page, but this might be the sort of thing you're looking for:
PHP Code:
<?php
//index.php
// include library files as needed
require_once("sitelib.inc");
// display header
require("header.php");
// parse get params and include the appropriate files
$page = isset($_GET['page']) ? $_GET['page'] : "";
switch ($page)
{
case "contactus":
require("contact.php");
break;
case "something":
require("something.php");
break;
default:
require("main.php");
}
require("footer.php");
?>
Then, all you your site links would look like this:
index.php?page=xxxx
That will wrap all of your pages in a standard template, and your included library can take care of such things as authentication, etc.