Old 03-14-2009   #1 (permalink)
Registered User
 

Join Date: Mar 2009
Posts: 2

Template System

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'];

Last edited by Infamous.Blizz; 03-14-2009 at 08:31 PM. Reason: took site link out
Infamous.Blizz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 03-14-2009   #2 (permalink)
Registered User
 

Join Date: Mar 2009
Posts: 2

I figured it out after 3 pain killers lol. I changed the $pagetitle to $pages just incase others have same problem. Thanks anyway guys
Infamous.Blizz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graveyard Template Jacorre Showrooms & Works In Progress 3 08-22-2008 03:00 PM
Web template Vlad_einhorn Adobe Photoshop 3 11-19-2005 10:08 PM
Advanced Template System Help! oli_gibson HTML / PHP / ASP / JS 6 07-21-2005 03:57 PM
PHP template Help fewtion HTML / PHP / ASP / JS 8 02-26-2005 04:55 PM
Template Help Mman Adobe Photoshop 2 11-11-2003 09:35 AM


All times are GMT +1. The time now is 09:29 PM.

Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT