#### Archived

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

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

## 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(\$content_file);
include("footer.php");
?>
Someone please explain to me what does \$_get does????
Nitin

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