Jump to content

Archived

This topic is now archived and is closed to further replies.

krissosa

PHP Include Navigation.. HELP!

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

×

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.