View Single Post
Old 07-20-2008, 01:26 PM  
potter
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
Who can write this PHP properly?

Ok, so I can't write php for the life of me. I have this script written out, kind of, but need it properly written as mine is pretty fubar.

Code:
<?
$ID = $_GET['ID'];
if($ID == ('1')) {
        include ('header.php');
        include ('1.php');
        include ('footer.php');
} 
elseif ($ID == ('2')) {
        include ('header.php');
        include ('2.php');
        include ('footer.php');
}
elseif ($ID == ('3')) {
        include ('header.php');
        include ('3.php');
        include ('footer.php');
} 
else {
        include ('noid.php');
}
?>
So basically if someone goes to said page.php?ID= and the ID is there it'll spit out the header and footer with a content page in the middle relating to that ID. If there is no ID then it'll include a completely different page all together.

I know this is easy stuff. I probably have everything from the way it grabs the ID, to the way it decides what to output. But alas I don't know shit about writing php.
__________________

potter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote