Jump to content

mccabre1

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://

Profile Information

  • Gender
    Not Telling
  • Location
    London

mccabre1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Also, when using the $page on many different things - such as specifying the page 'title', just put the following above your doctype: [code] <? $page = $_GET['page']; ?> [/code] Thanks again! Chris
  2. [!--quoteo(post=346437:date=Feb 16 2006, 05:26 PM:name=Darkness Soul)--][div class=\'quotetop\']QUOTE(Darkness Soul @ Feb 16 2006, 05:26 PM) [snapback]346437[/snapback][/div][div class=\'quotemain\'][!--quotec--] May it works, i don't test ;) [code]<?php    $page = $_GET['page'];    include $page; ?>[/code] ^~ if works, tell me, if wont, tell me too, so then i will test here and get the code.. bye [/quote] Yes! That's fantastic, thanks very much! I wrote the code out as follows: [code] <? $page = $_GET['$page']; include ("$page.php"); ?> [/code] - '.php' is the file extension on my includes. Thanks again, Chris
  3. Hi, I'm trying to include files in my 'index.php' page based on the url. My menu links to: index.php?page=home index.php?page=news index.php?page=contact then I want to include the content based on that url, so if it reads 'index.php?page=home' it will load 'home.php'. I currently have this line of code to call the file: [code] <? include ("$page.php"); ?> [/code] Now, when I load my page it can't find the file and doesn't recognise the 'page=' bit of the url. Can anyone tell me what I'm doing wrong?? Thanks. C
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.