AlkaSeltxer Posted August 31, 2011 Share Posted August 31, 2011 What I'm trying to do is get a php file with content to load into my basic page template based on the page id, however it's not loading anything, however there are no errors coming up. I've looked everywhere I could find, and tried everything I could think of. I really could use some help on this. Below is the page template code and the code I'm trying to use to get the content to load up. page_templ.php <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <link rel="stylesheet" type="text/css" href="templates/content/style.css" > <!--This is the css used for IE because we need to correct some things for it.--> <!--[if IE]> <style type="text/css"> @import 'templates/content/styleIE.css'; </style> <![endif]--> </head> <body> <?php //We need to load our language files with our common text varibles require("content/langeng.php"); ?> <div id="header"> <? //Lets show the header. I use html where I can so smartphones load as little advanced code as possible require_once("header.php"); ?> </div> <div id="menu"> <?//Now our menu. require_once("menu.php"); ?> </div> <div id="mbody"> <?//Now the primary site content. //Load up our postvars.php file require_once("content/postvars.php"); ?> </div> </body> </html> postvars.php <?php $id = $_POST["id"]; if ( $id == "home" ) { include 'main_c.php'; } elseif ( $id == "guides" ) { include 'guides_c.php'; } elseif ( $id == "trips" ) { include 'trips_c.php'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/246133-solved-content-not-loading-based-on-page-id/ Share on other sites More sharing options...
premiso Posted August 31, 2011 Share Posted August 31, 2011 Are you sure you want to use POST and not GET? Quote Link to comment https://forums.phpfreaks.com/topic/246133-solved-content-not-loading-based-on-page-id/#findComment-1264052 Share on other sites More sharing options...
AlkaSeltxer Posted August 31, 2011 Author Share Posted August 31, 2011 Are you sure you want to use POST and not GET? Damn it! What can I say. Thanks for pointing that out. Quote Link to comment https://forums.phpfreaks.com/topic/246133-solved-content-not-loading-based-on-page-id/#findComment-1264054 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.