The Header : HTML « HTML « PHP






The Header

 
//A sample header file
<?
$site_name = "PHP";
$site_email = "w@hotmail.com";
$site_path = "http://localhost/php";
?>
<html>
<head>
<title> <?=$site_name;?> </title>
</head>
<body>
<table>
     <tr><td>PHP</td><td>
     <?
         print date ("F d, h:i a");
     ?>
     </td>
     </tr>
</table>


//The Footer
<table>
<tr><td><a href = "mailto:<?=$site_email;?>">contact</a></td></tr>
</table>
</body>
</html>

//The Body
<table>
<tr>
<td>
<a href = "<?=$site_path;?>/tutorials.php">tutorials</a> <br>
</td>
</tr>
</table>

//Putting It Together: Incorporating the Header, Footer, and Body
<?
include ("header.tpl");
include ("index_body.tpl");
include ("footer.tpl");
?>
  
  








Related examples in the same category

1.Display of HTML using PHP code
2.Dynamic Generation of Tags from an Array
3.Dynamic HTML tags
4.Dynamic PHP page creation
5.Dynamic date insertion
6.Example: Creating an XHTML document from PHP
7.Output Control
8.Output image tag
9.Output image tag with global path value