well the way i do it is quite simple (for me) 🙂
I create an index.php which in cludes the files...
for example as header we have a /template/header.php and footer is /template/footer.php.
as the socalled modules are located in /modules/
now starting with index.php
this can be anything you want including as much files as you like but it has to include the header and footer at any times... so on top you insert something like
//head
<?php
include "template/header.php";
//main
/*
here you insert the code for the mainpage contents...
i use for my websites code like:
*/
if(act=="") { include "modules/mod_mainpage.php"; } //mainpage
if(act=="01) { include "modules/-yourfilename.php-"; } //add as much as you want...
//foot
include "template/footer.php";
there you have a basic thing...
in the header.php you specify several things like tables and such. be sure you have the cell or row for the main content not closed in the header... this will be done in the foot or if you use somewhat more advanced code you can include the:
echo "</td>";
underneath the if links in index.php (just to be sure)
Next, ALL of your links to other pages must have the link:
<a href=index.php?act=01>your url</a>
or something like it...
and finally your footer.php closes any tags left open in the header.php or mainpages... this can be a tricky thing to do because your editor (if you use a "good" one) will try to close all tags in one file. which we obviously DONT want here 🙂
If you got any more questions please have a look at my website www.zerocom.nl (dutch) or just reply or email me 🙂
greetings 😃