< back < | > forward >

PHP Includes


Why bother you ask? Well because they are AMAZING. Unfortunately not everyone like webs users for example can use these. So make sure you have the ability to use .php extension files C:

So let's get started! It's actually quite easy!

Get the code for the layout you are gonna use out and ready to go!
Make two new files. style.css and header.php

Take your code and cut&paste EVERYTHING from <style> to </style> into the style.css file. Plus the title and such.
Save and upload to your site.
The code should be {somewhat} like this

Take everything else in your code, like the divs and put them in the header.php file
The div for you main content should be at the bottom and should NOT have the </div> at the bottom
The code should be {somewhat} like this

Nothing should be after the div id identification starter.
This is because PHP includes are "linking" {including} other pages into one. So when you write your other pages all you have to do is put the PHP include codes at the top and BAM your good to go.
Click here for codes

Hopefully you understood this. I know it is a really short tutorial, but it's not all that hard. Sorry if I didnt help you. Please feel free to email me at amber@pixel-heart.org if you need help. I will gladly help you!
Image and video hosting by TinyPic