<?php
if (!$_GET['p']) {
include "header.php";
echo "<br/>";
include "home.php";
}
if ($_GET['p'] && $_GET['p'] == "home" || $_GET['p'] == "pricing" || $_GET['p'] == "portfolio" || $_GET['p'] == "order" || $_GET['p'] == "contact") {
include "header.php";
echo "<br/>";
include $_GET['p'].".php";
}else {
include "error404.php";
}
The above code simply does the obvious index.php?p=pagenamehere
and when $_GET is non existant simply just includes home.php
when i do index.php?p=home it works fine
but when just index.php
the error404.php is included at the bottom and obviously i dont want that.
any help would be appreciated
please excuse the quality of my script im only just getting back into php
thankyou
Reece