Jump to content

Simple Link Question


mrwilson

Recommended Posts

Hello.  This has to be so easy its embarrasing. 
I am trying to follow this example here [url=http://www.alistapart.com/stories/phpcms/]http://www.alistapart.com/stories/phpcms/[/url], the Swtching content with PHP variables section.

I have followed the instructions on that page and have created the pages required. (very VERY simple pages).
I have created the body and menu sections as required and changed the body include to
<div class="body">
<?php @ require_once ("$page.php"); ?>
</div>

I then created the menus as shown on the link above as in below.

<a href="template.php?page=dogs">The Dog page</a><br />
<a href="template.php?page=cats">The cat page</a>

When I put it all together, absolutly nothing happens except the URL address above changes and shows that I am now on either the cat or dog page.  My question is, is there something I need to include in the code on the $page.php page to give the switch a place to reside?  According to the example, the whole page should be replaced.  Or am I misunderstanding the whole concept?

The trial page I have made is here.  [url=http://lunarcafe.com/tryme/template.php]http://lunarcafe.com/tryme/template.php[/url]

Than you for taking the time to read this.  After reading the code you guys are dealing with I am almost embarrased to post this.  My server does have PHP on it, I have several other PHP pages that work fine.  I just dont know how to use this type of switching.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.