Jump to content

Archived

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

truenitin

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

Share this post


Link to post
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....

Share this post


Link to post
Share on other sites

×

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.