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

#1 truenitin

truenitin
• Members
• Member
• 10 posts

Posted 05 July 2006 - 10:36 AM

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

#2 truenitin

truenitin
• Members
• Member
• 10 posts

Posted 05 July 2006 - 10:45 AM

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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users