Jump to content

Undefined index: page in c:\program files\easyphp1-8\www\index.php on line2


truenitin

Recommended Posts

hiii

i tried a lot but i am still gettting this error

Undefined index: page in c:\program files\easyphp1-8\www\index.php on line 8

i tried using an if  statement but then also i get the error

my lines of code are

<?php
$page=$_GET['page']; =======error point
if (!$page) $page = "";

$content_file=$_SERVER["DOCUMENT_ROOT"]."/".$page.".php";
echo $content_file;

$title = ($page) ? "$page - My Site!" : "Main page - My Site!";
include("header.php");
//include($content_file);
include("footer.php");
?>
Someone please explain to me what does $_get does????
Nitin
Link to comment
Share on other sites

ok i solved the problem

by using isset

but now i am having another problem

when i run the page it goes into a loop
and end with standard error that page cannot be displayed

it is something like this

if i comment the line $content_file it works
otherwise it goes in loop

Nitin

what is the behaviour of the server....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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