chong Posted December 15, 2006 Share Posted December 15, 2006 Afternoon all, Im fairly new to PHP and I have started to experiment with some code in order to get php to include my pages into the body(for instance index.php?=news etc) i have written a simple part of my code below, however i am a little stuck...i need to add the .php to the $page variable however im lost - im positive ive gone hugely wrong and missing something!any help would be much appreciated!<?php include('header.inc'); ?><?php $page = $_GET['url']; if !$page{ $body_inc = 404_notfoud } $body_inc = $page; include($body_inc); ?><?php include('footer'); ?> Quote Link to comment Share on other sites More sharing options...
taith Posted December 15, 2006 Share Posted December 15, 2006 [code]<?phpinclude('header.inc');$page = $_GET['url'];if(empty($page)) $page = 404_notfoudinclude($page.'.php'); include('footer');?>[/code] Quote Link to comment 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.