why not create a file like this.....
<html>
<head><title>hello</title></head>
<body>
bla bla bla my logo etc
<?php
//include all the php functions in here, random image whatever
?>
Then have your footer as you have it, but make sure that it only contains the end of the html document (likewise make sure the header only contains the top of the document.). i.e:
<?php
?>
footer text
</body>
</html>
Name your files header.php and footer.php.
then call it all together like so...
<?php
include('header.php');
echo "main page here";
include('footer.php');
?>
this way the server treats both fiels as PHP files (because thats what they are) and processes them as they are. You need to rememebr that the PHP is merely attaching it all together. That si the reaosn whyn not having a complete html ciode in either file as the final out put will ahve it all bundled up if you get me?
A second idea is to create a file which contains functions and then call them, like this...
file: functions.php
<?php
function header() {
?>
<html>
<head><title>hello</title></head>
<body>
bla bla bla my logo etc
<?php
//random image code here
}
function footer(0) {
echo "footer text";
?>
</body>
</html>
<?php
}
?>
then call this php page into the main page....
<?php
require_once('functions.php');
//now call the function
header();
echo "main body in here"
footer();
?>
I hope these ideas help you. Sorry for it ebing so long!