Jump to content


PHP site pages dont load

  • Please log in to reply
4 replies to this topic

#1 mitcho

  • Members
  • PipPip
  • Member
  • 21 posts

Posted 18 April 2006 - 07:23 AM

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

#2 Roberto

  • Members
  • PipPip
  • Member
  • 16 posts
  • LocationLondon, England

Posted 18 April 2006 - 07:43 AM

Almost certainly it's because


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.

Mad Mouse Media Web Design
t: (+34) 610 837 558
e: rob@madmousemedia.co.uk
w: www.madmousemedia.co.uk
w: www.madmouseart.com *************************************

#3 mitcho

  • Members
  • PipPip
  • Member
  • 21 posts

Posted 19 April 2006 - 07:54 AM

Could someone please provide an example of how to fix the code i am using.

here is the php:

?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');
} ?>

and i call it like this eg.

<a href="index.php?id=contact">CONTACT</a>

#4 ToonMariner

  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 19 April 2006 - 08:58 AM

Somewhere before your switch statement have the following...

$id = $_GET['id'];
follow me on twitter @PHPsycho

#5 mitcho

  • Members
  • PipPip
  • Member
  • 21 posts

Posted 19 April 2006 - 08:59 AM

[!--quoteo(post=366344:date=Apr 19 2006, 03:58 AM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Apr 19 2006, 03:58 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Somewhere before your switch statement have the following...

$id = $_GET['id'];

thanks - that worked exactly right! your help is much appreciated!!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users