I did a search before posting and found nothing. I'm having a problem with the template system from this site's tutorials. I have custom pages in its own directory on the server and also listed in my database table.
Code:
list($pagetitle, $pageactive) = $db->sql_fetchrow($db->sql_query("SELECT pagetitle, pageactive FROM ".$prefix."_pages"));
$pages = $_GET['page'];
echo"<div class=\"blocktop\">$pages</div>\n";
echo"<div class=\"blockmid\">\n";
if ($pages == ""){
//include('news.php');
echo"test";
} else if($pages == $pagetitle){
require_once("pages/$pagetitle/index.php");
} else {
echo"<div align=\"center\"><strong>Sorry but the page you're looking for doesn't exist</strong></div>\n";
}
echo"</div>\n";
}
As you can see I am calling the custom pages from the sql table. When I click on the custom Contact page it works like a charm, then when I go down to the Search page. It's picking it up as if the page don't exist. I think its something to do with the $pages = $_GET['page'];