Jump to content


Photo

PHP Include Navigation.. HELP!


  • Please log in to reply
1 reply to this topic

#1 krissosa

krissosa
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 04 April 2006 - 03:11 AM

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 DOES 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

#2 khendar

khendar
  • Members
  • PipPipPip
  • Advanced Member
  • 78 posts

Posted 04 April 2006 - 04:15 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users