(c)2004 by Ben Rourke
Here's a really simple way... to maintain and speed up your web site development.
As your web site grows, so does problem of maintaining it become more complex. Even a two or three page site can have a lot of detail in it. If you want to make any changes to links or content you have to do so for each page on site, and then upload all new information. All this can be very time consuming and also create possibility of errors creeping in, which can make your site look less professional. This is where PHP can come to your assistance. I am not going to go into an explanation of PHP here, there are lots of sites online where you can find out more detail about it, if you wish to get more involved. Here, I am going to show some simple techniques to help you with your web site creation and maintenance, thus saving you lots of time and reducing risk of errors.
Step 1: How to change information across a complete site easily using PHP.
Say you have a list of links across top of your page and you want to maintain these links over a 20 page site. If you were to change one of those links, you would manually have to do it for remaining 19 pages also. As you can appreciate this would be a time consuming process making changes and uploading each page seperately. Also potential to make a mistake is very great indeed.
However using method outlined below, you will be able to update complete sites in no time at all, virtually reducing possibility of making mistakes to zero.
The trick is to use PHP to 'include' a header and a footer template called from your main file 'index.php'
Don't worry if this does not make sense at present as all will be explained shortly.
Here is an example of a index.php file:
========================================================== <?php include 'template/header.php'; ?>
Place your content here.
<?php include 'template/footer.php'; ?>
Point your browser to http://www.seazzypromotions.com/example to see it in action. View source on that web page and notice all HTML. Where did all that come from you ask? All will be revealed now, and then you are well on your way to easily generating and maintaining your sites with ease.