Automatic Web Design: PHP
I just finished creating my website and guess what, I need to make a change to my header. Ohhh... I have over a hundred pages with that header code in it. Ever had that happen? I know it's happened to me on a number of occasions. That is why when I started to create this teamphotoshop.com site I decided to plan ahead. With the help of a few friends I was introduced to the wonderful world of PHP. PHP is great for situations like this. One of the functions of PHP is the "include" function. This will prove to be a lifesaver. Let's get started.
If you want to have a simple and time saving way to update or alter parts of your site PHP will soon become your friend. I'm going to walk you through the steps I took when creating this site. The first thing I was concerned about when planning the site out was the ease of making changes or updating the site. The main area I wanted to focus on was the header since that is where all of my links are located at. The first step was to create my header and get of all my code set up. Just use your favorite editor for creating your webpage and create your header like you normally would. Once you have your code completed stop. We will need to to name our document with a .php extension since we are going to be executing .php commands inside of it. If we named our file .html the PHP would not work. There are ways around this but for now we will stay on track by using the .php extension on our documents that we want to use the "include" function in.

Ok, we have our header code all set up inside of our document and since it is our entrance page lets call it index.php. If you are like me I normally put my header inside of its own table and then put the content area of my site in its own table. If you do it differently it won't matter. You will just have to be very careful when removing the header code from your page.
Sponsored Links: