I don't want to edit all my pages, just want one footer to be able to do that, please help me. Thanks.
You do have to edit all your pages one last time to include the code that Mad4 provided. While you are doing that you might as well do a header.php also.
If you have a good text editor such as textpad, you can do a search and replace across multiple files. Seach for </body> and replace it with <?php include 'footer.php'; ?></body> That can save you editing hundreds of files.
Every web page I write by hand looks like <?include $_SERVER['DOCUMENT_ROOT'] . "/template/preamble" ?> <TITLE>...</TITLE> ... other header stuff <?include $_SERVER['DOCUMENT_ROOT'] . "/template/top" ?> ... the real content <?include $_SERVER['DOCUMENT_ROOT'] . "/template/bottom" ?> where template/preamble contains <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> and template/top contains ...common header stuff </HEAD> <BODY> ... navbar stuff and template/bottom contains ...navbar termination stuff (i use tables, so sue me) ... copyright / ads if I have em </BODY> </HTML> Not as wonderful as smarty or one of the other templating languages but it works for me.
I think it's best to use the <?php include("header.php"); ?> just in case your current host (or future host for that matter) does not have the .inc included as something that should be read as php in browsers. What happens is that someone can see the content of your file but with php you know for certain it is only rendered as html in the browser (other words they cannot see your coding). I don't think this is a big deal for something as simple as what you are proposing but I think it's just a good habit to have getting starting. best of luck to you.