This tutorial will show you how to add a header and footer to all the pages
of your site using PHP (PHP: Hypertext Preprocessor). Your web host must
support PHP for this to work.
Instead of recreating the same header and footer on every page on your site,
you will have only one set to maintain, which are held in their own files.
They will be linked to your site using two simple lines of PHP code.
The code that is contained in the header and footer files should only include
code that would appear between the <body>/</body>
tags. This is because they will make up part of other pages in your site
within their BODY tags.
If you create the files using an editor such as Microsoft
FrontPage, you will need to delete the default code that is generated e.g.:
The best thing to put in the header section is the site navigation e.g.
buttons or a dropdown box. You could also include your site's logo, any
scripts that are used by your site or HTML code that generates ads.
The footer usually contains the name of the person or organisation
responsible for the site. You could also include a link to a contact page
(remember never to put your e-mail address on your site), a hit counter or more
code for ads.