Step Two Now we have the actual page which will create our individual pages from, what we need now are the pages to include. So open up a new blank page in your editor and then save this blank page and call it header.php
Repeat this process for footer.php and menu.php. So now you should have 3 blank pages and the template.php page. You now have all the pages created that will form the basis of your website. Remember this is a tutorial only and you can add any colour format / style after you have got to know a bit about how to use the PHP includes in a website.
Pages you should have created are:-
Step Three Open up the header.php page and add some text or logo. For our template just add some text which says: "Welcome to PHP Include Test".
Open up the footer.php page and add a copyright notice. The footer can be used for other purposes including more links, but all this can be added later. We will just use it for our copyright notice.
Open up the menu.php page and add the following:
Now we are happy with how our site is progressing, it is time to open up the template.php page. You will notice this page is blank and it will remain so. We are just going to use this page as a template page to create our other pages. So with this page open in your HTML editor, save this page as index.php.
Open this new page (index.php) as this is our new main index page. Repeat this process as many times as you want creating a number of pages to correspond with your website.
Now we have the foundation and pages created, add the text to all the pages you have just created and then open up the menu.php page again. You now have the number of links and pages that you need to add to this file.
For instance, if you created 3 pages from the template.php page (index.php, about.php, contact.php) you can now add these links to the page. Anything you now add to the pages header.php, menu.php footer.php will automatically appear on every page on your website if you use the template,.php page to create extra pages.
Now, to view the pages you have created you will need to upload them to a PHP enabled web server. Nearly all hosts support this now as standard. Point your browser to the uploaded index page and you should be able to see the basic layout and pages we have just created. Have a p[lay around adding text and images so you get the full idea of what PHP Includes can do. It's a great way to create and make a website very maintainable.
After following this tutorial, you should be able to create your own website which is very easy to maintain and consists of loads of pages with quality content for the search engines to find.