Title: Learn PHP
Author: Eddie

PHP is a neat little trick that lets your change your layout without having to edit every single page of your site. It's not complicated and is very handy. Before you convert to PHP make sure your host supports PHP or it won't work. Remember, Geocities, Angelfire, etc. don't have PHP support. So don't bother me about that. Anyway, if you have any questions please send them to webmaster@die-hard.net.

Step 1) Take all your pages of content and delete all SSI, asp tags etc, and just leave the body part with the content in it. Change the extention from .shtml or whatever you had to .html. Once you do this, take just your layout code and put it in notepad or whatever HTML Editor you'd like to use. Now here's the tricky parts.

Step 2) Make sure to re-add your navigation links and anything else you used SSI back into your layout. You should not need SSI anymore.

Step 3) With just your layout in HTML code with everything on it except the content part, put it into notepad or whatever your using for editing. Insert this code where your content was:

<*?php include ("$page"); ?*> (remove the *'s)

Remember to edit this to the following or it won't work. In the "$page" part, you can change the "page" to anything you'd like for example "sinet". This code tells the browser to load the specified page in your PHP page. Now save this as main.php or whatever you'd like the PHP page to be called.

Step 4) Now test it, upload the PHP page to your server and 1 page of content that you cleaned on Step 1. Now punch in the address into your browser, for example http://www.yoursite.com/main.php?whatever=page.html. This is probably the hardest thing of all. Here's what each mean to clear up any questions:

Lets use http://www.yoursite.com/main.php?page=news.txt

main.php or whatever you named it: The main PHP page that has the entire layout in it expect the content part "news.txt" or what you chose in your PHP code. Change "page" to what you choose in your PHP code inside your PHP page, for example "page".

"news.txt": The file name of the content page you want to load, in this example the news page is being loaded. Remember to type in .html extension or something else.

"?": Remember the question mark after your PHP page name in your browser.

See how on this site, the page name is "page" so for example this page your on now loads as "main.php?page=phptut.html". This is tricky and so don't give up if you get an error loaded on your php page.

All right, now you should have PHP fully working. Remember to change your links to whatever you choose to named your PHP page and plus the extension to the page. If you don't see anything, check your code again and make sure your server supports PHP, if your not sure, ask your host or check. Good luck with your site!