Jump to content

Archived

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

mitcho

PHP site pages dont load

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Somewhere before your switch statement have the following...

$id = $_GET['id'];

Share this post


Link to post
Share on other sites
[!--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!!

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.