krissosa Posted April 4, 2006 Share Posted April 4, 2006 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.... <?phpswitch($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=insertcasenameherePlease I need to get this up soon so anything that might would be helpful!Thanks for looking,Kris Quote Link to comment Share on other sites More sharing options...
khendar Posted April 4, 2006 Share Posted April 4, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.