Requirements
1. You should understand the majority of PHP (ex: variables, echo, etc. www.w3schools.com is a good reference).
2. Experienced with HTML.
3. You need a PHP compatible server if you wish to see your results.
Description
One of the major advantages of PHP is the ability to create something similar to an Iframe, only without the scroll-bar. The main advantage of this is that you only need one layout page, while the others can be simple 'white space & content' pages. Another advantage of this is your web site doesn't look like a fifth grader coded it.
Try It Out
The Code
CODE
<?php $default = "blah.html"; if($id == ""){$id = $default;}elseif(isset($id)){$id = $id;} ?>
<?php include ("$id"); ?>
<?php include ("$id"); ?>
Alright, so now your asking, "What the fudge!?" I'll explain it to you.
The $default variable is the default page that will appear when a visitor comes to your site. The Replace blah.html with the location of your default or main page. Now when somebody visits your site they will see that page.
See that include tag? This tells your server to include whatever $id is equal to. The tag above it makes $id equal to whatever you file you chose for $default. So how do we create a link? We simply change what $id is equal to using some everyday HTML - with a twist.
The Code
CODE
<a href="?id=blah2.html">Link Text</a>
See the twist? Using ?id=blah2.html we are able to change what $id is equal to. Replace blah2.html with whatever page you want to create a link.
Get it? If not then try reading it over a few times.


