PX : code

PHP Include Function by sardonyx quinx
Download this code


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample Title Here</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body { margin: 0px; }
.contentborder { border: 1px solid #FFCCCC; font-family: verdana; font-size: x-small; }
.defaultfont { font-family: verdana; font-size: x-small; }
-->
</style>
</head>

<body>
<table width="100%" border="0" cellpadding="4" cellspacing="4" class="defaultfont">
<tr><td><strong><font size="7">Header Section</font><br /></strong>just a simple description of the webpage.</td></tr>
</table>

<table width="100%" border="0" cellspacing="4" cellpadding="4">
<tr>
<td width="20%" valign="top">

<table width="100%" border="0" cellpadding="4" cellspacing="4" class="contentborder">
<tr>
<td><strong><u>Main Navigation</u></strong></td>
</tr>
<tr><td><a href="#">Item One</a></td></tr>
<tr><td><a href="#">Item Two</a></td></tr>
<tr><td><a href="#">Item Three</a></td></tr>
<tr><td><a href="#">Item Four</a></td></tr>
</table>

</td>

<td width="80%" valign="top">

<table width="100%" border="0" cellpadding="4" cellspacing="4" class="contentborder">
<tr><td bgcolor="#FFCCCC"><strong>Section Title Here</strong></td></tr>
<tr><td>

Some of the contents should be put here

</td></tr>
</table>

</td>
</tr>
</table>

<table width="100%" border="0" cellpadding="4" cellspacing="4" class="defaultfont">
<tr><td align="center">
<strong>&copy; 2003 SARDesigns. All Rights Reserved</strong><br />
<a href="#">Legal</a> | <a href="#">Disclaimer</a> | <a href="#">FAQs</a> | <a href="#">Link Back</a>
</td></tr>
</table>

</body>
</html>

The above source code should be named as defaulthtml.html Please take note that the above source code will be our guide template with the rest of this tutorial session. 

The next thing that you should do is to copy and paste the html codes to your WYSIWYG or HTML editor that depends on the color coding procedures in this tutorial. 

Text which are colored with red will be named as header.php Black text for content.php and blue text for bottom.php 

After copying the source codes from the HTML template into your PHP files, the next thing that you should do is to add the following PHP source codes into your content.php 

<?php
include ("header.php"); // either this one
include 'header'.php'; // or this one
?>

<!-- Start of the contents -- >
Some of the contents should be put here
<!-- End of contents -->

<?php
include_once ("bottom.php"); // either this one
include_once '
bottom.php// or this one
?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.