Jump to content

PHP Include Navigation.. HELP!


krissosa

Recommended Posts

I seem to be having a problem with my PHP navigation.

It works on my server and for some reason it doesn't work on my clients server.
I am completely stumped on the issue and was hoping someone had some insight.


THE SITE IT [u]DOES[/u] WORK ON:
[a href=\"http://www.krissosa.com/clients/brs/demo/\" target=\"_blank\"]http://www.krissosa.com/clients/brs/demo/[/a]

You'll notice that I have PHP Include navigation on the buttons.
They work on my server (the one above)

HOWEVER:

[a href=\"http://www.bensrubberstamps.com/new/\" target=\"_blank\"]http://www.bensrubberstamps.com/new/[/a]

This is my clients server and for some odd reason the includes are NOT working on hers.

-----------------------
Here's the code I'm using....

<?php
switch($id) {
default:
include('cnt.php');
break; case "directions":
include('directions.php');
break; case "products":
include('prodiframe.shtml');
break; case "contact":
include('contact.php');
break; case "company":
include('company.php');
break; case "awards":
include('awards.php');
break; case "promotional":
include('promo.php');
}
?>



And for the links im using: ?id=insertcasenamehere


Please I need to get this up soon so anything that might would be helpful!


Thanks for looking,
Kris
Link to comment
Share on other sites

I believe your problem is register_globals. Its enabled on your server but not on your clients. Which is a good thing because its deprecated.

The $id variable is being set on your server because its set up to automatically assign $_GET variables to individual variables. So rather than having to put $id = $_GET['id']; at the top of the script you can just go ahead and start using $id.

Your clients server doesn't have this enabled - So you will have to add $id = $_GET['id']; to the top of your script and it will work fine on both.
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.