Header and Footer
How to have my header portion in a single file and use it accross at all files?
What is a header and footer in html?
Explanation
It is very simple to do this using php.
Most of the commercial website use common header and footer files. It will be so helpful because when we want to change any information it is enough if we do it in a single file rather than duplicating it.
It will be so easy to add the change just in single file instead of all the files we have.
Follow the steps to do it yourself
Step 1:Create a file as head.php and have all your header info in it
Example:You will have something like this in head.php
<html>
<head>
</head>
<body>
<table width=80% height=30>
<tr>
<td>
<div align=center> Page Title </div>
//Other links for home,support etc.....
</td>
</tr>
</table>
Step 2:Now create your main files. In all the files just use "include" to have the header.
Lets say we have index.php, the code in it will look like this
<?php
include 'head.php';
?>
<table width=80% height=100%>
<tr>
<td>
//All you contents to follow
.......
......
</body>
</html>
Note: So the header file head.php will be included in all files which will have a common header. The same thing can be done for footer too. Make sure that all the files are named with .php extension.