mitcho Posted April 18, 2006 Share Posted April 18, 2006 hey, i have just uploaded this website to this url - [a href=\"http://www.guardianlawyers.com.au/\" target=\"_blank\"]http://www.guardianlawyers.com.au/[/a]what should happen is when u click the buttons, the respective html pages should load into the site. however this is not working as none of the buttons work when clicked.i dont know that much about versioning but i put this file on the server - [a href=\"http://www.guardianlawyers.com.au/info.php\" target=\"_blank\"]http://www.guardianlawyers.com.au/info.php[/a] to get the php info.however, the exact same site works here - [a href=\"http://www.mitchellpage.com.au/temp/guardian/\" target=\"_blank\"]http://www.mitchellpage.com.au/temp/guardian/[/a]can anyone tell why, is it something to do with the versioning? please advise... Quote Link to comment Share on other sites More sharing options...
Roberto Posted April 18, 2006 Share Posted April 18, 2006 Almost certainly it's because register_globals=off which is off by default in PHP 5. Turning it on would be a short term fix but you really should fix the code so it uses $_GET or $_POST variables.Rob Quote Link to comment Share on other sites More sharing options...
mitcho Posted April 19, 2006 Author Share Posted April 19, 2006 Could someone please provide an example of how to fix the code i am using.here is the php:[code]?php switch($id) { default: include('home.html');break; case "home": include('home.html');break; case "about": include('about.html');break; case "services": include('services.html');break; case "people": include('people.html');break; case "news": include('news/news.php');break; case "contact": include('contact.html');break; case "disclaimer": include('disclaimer.html');break; case "sitemap": include('sitemap.html');} ?>[/code]and i call it like this eg. [code]<a href="index.php?id=contact">CONTACT</a>[/code] Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted April 19, 2006 Share Posted April 19, 2006 Somewhere before your switch statement have the following...$id = $_GET['id']; Quote Link to comment Share on other sites More sharing options...
mitcho Posted April 19, 2006 Author Share Posted April 19, 2006 [!--quoteo(post=366344:date=Apr 19 2006, 03:58 AM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Apr 19 2006, 03:58 AM) [snapback]366344[/snapback][/div][div class=\'quotemain\'][!--quotec--]Somewhere before your switch statement have the following...$id = $_GET['id'];[/quote]thanks - that worked exactly right! your help is much appreciated!! 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.