Posts: 457
Name: Randy
Location: Northern Wisconsin
|
Sorry I took so long to answer, been away for a few days.
Here is a tut on the subject of includes:
http://www.w3schools.com/PHP/php_includes.asp
Yes, every page will need the php extension, but your xhtml will be basically the same.
Just design your page as normal and then break it up into chunks. For example, Take everything from the doctype to just past the navigation area. Save this code in its own file named header.php.
Now when you create a new page like index.php you can simply put at the first line:
<?php include("header.php"); ?> (That is the extent of PHP you will need to know)
Then code your page as normal from that point(in this case, after the navigation area). When you view the source of the live page, you will see that php has placed all the code form your header file into the page.
One last note, when you work with PHP you will need to be on either a live site or have a local server set up on your computer like http://www.apachefriends.org/en/xampp.html.
Good luck!
|