I've managed to make the use of PHP's "include" function in order to share Header, Top Menu, Left Menu, Right Menu & Footer. The only exception is the Content, since it would be unique for each individual page.

Problem is, I'm getting my "Content" displaying BELOW the "Footer", as it can be seen: http://members.lycos.co.uk/darsh25/contact.php

All the files within this website can be seen on: http://members.lycos.co.uk/darsh25/

>> "menu.inc" is the PHP's include file
>> contact.php & about.php are the files that's NOT displaying content properly (where it appears to go BELOW the "Footer").
>> contact.html OR about.html shows the desired layout (these are couple of ".html" files that I first created BEFORE the ".php" version of it, although, I'll be deleting these later on, once I get the display of my ".php" files sorted out)

All I know for the fact that it's a rather silly mistake I'm making perhaps involving putting the wrong line of code in wrong file. Can anyone help ???

Codes for "about.php":

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Personal Website</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>


<?php include("menu.inc");?>

<div id="centerContent">
<p class="first-letter">This is the content for about.php.</p>

<p>
<?php
function ourMotto(){
    echo "We deliver quantity, not quality!<br/>";
}
ourMotto();
?>
</p>

</div>

</html>

This is a html problem.
about.php contains the <html></html> tags which causes it to be shown at the bottom.

It actually does not matter if your included files are php or html.
They will be parsed just like php files where anything embeded between the php tags will be parsed as php.
The parent file, has to be a php file however.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.