If people make fun of you, it probably means you're doing something right. - Amy Lee

SHAINA

moi 22yo
college student, writer, reporter, artist, daughter, sister, aunt, friend, vampire, pirate, horror movie fan, fantasy movie fan, indie music fan, johnny depp fan, criss angel loyal, strawberry crush addict
>>>>> need more?

TWITTER

AFFILIATES

Rachel-Rebecka Angelica Afef Mallory Maloney Ashley
apply?

DISCLAIMER

Site content © 2008 and beyond Dare to Live Productions unless otherwise stated. For further site credits, click here.

PHP Site in 4 Steps

Reminder: be sure to change all file extensions in your code to .php so you won't get dead links!!! (common mistake I thought I would mention)

1. First you are going to need to take the first part of your code (whatever you put before the content of a specific page) and write that into notepad or whatever you use to edit your pages. Name that file "header.php"

ex. of header.php

<html> <head> <title> title </title> </head>

<body> (divs, tables, etc are positioned here...)

2. Take the closing tags, along with everything else you post after the content of a page and do the same thing. Name that file "footer.php"

ex. of footer.php

</body> </html>

3. Make a separate file for your stylesheet. Name it "style.css"

**What is a stylesheet? For now, let me direct you to this informative site**

Position the following code in your header like this:

<html><head> <LINK REL=stylesheet HREF="style.css" TYPE="text/css"> <title></title> </head>

4. Then for your other pages, simply put these codes around the content instead of the usual repeat of your layout code:

<? include("header.php"); ?>

<? include("footer.php"); ?>

Congratulations! You have just converted your site to php. This makes updating a LOT easier, since all you need to do is update your stylesheet and header/footer files! :)