Jump to content

PHP navigation error


joshgarrod

Recommended Posts

Hello all, I had a lovely working nav system for my website, now since I have moved servers it doesn't want to work for my 'main' page which is the default page brought up on typing in the url. the error I am getting is this

Notice: Undefined index: page in e:\domains\e\mysite.com\user\htdocs\index.php on line 151

 

But I am not convinced it my index page that is the problem.

 

here is the nav code from the index page

<?php 

// Start PHP Navigation Sytem

$default = "main.php";

$page = $_GET['page'];

if(isset($page)){

include($page.".php");}

else 
{
include($default);}

// END PHP Navigation System
?>

 

Anyone any ideas as to what is going wrong please?

 

Thanks v much in advance

 

Link to comment
https://forums.phpfreaks.com/topic/96595-php-navigation-error/
Share on other sites

It does work, i think it must be something within my main.php pge that is screwing it up, the first page that is meant to display screws it up, but if you click a link you see how it should be displayed. i tried putting another page as the default and it worked fine?

Link to comment
https://forums.phpfreaks.com/topic/96595-php-navigation-error/#findComment-494312
Share on other sites

Archived

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

×
×
  • Create New...

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.