a common practice with building php pages is to make links like
index.php?page=main
index.php?page=about
index.php?page=contact
etc.
to achieve this you can build a page with the common header and footer html, and have your include be based on what the page is set to.
<?php
$include_path = '/home/yoursite/www/includes/';
include $include_path . 'header.php';
if (!isset($_GET['page'] || empty($_GET['page'])) {
include $include_path . 'main.php';
} else {
if (file_exists($include_path . $_GET['page'] . '.php')) {
include $include_path . $_GET['page'] . '.php';
} else {
include $include_path . 'main.php';
}
}
include $include_path . 'footer.php';
?>
with that code, header.php contains your html and head tags, the style information, and all the top html of your page just before the table where the main content shows up.
footer.php contains all the closing tags to the table and any additional stuff you add at the bottom. based on what page is specified in the url, it includes the appropriate page.