Page 1 of 1
problem with content loader
Posted: Sat Aug 14, 2004 3:02 pm
by Getran
i wrote this script and as u can probably see if loads content, and makes it so u can use page.php?p=bla. But i'm getting another undefined index error, this is the error:
Notice: Undefined index: content in *hidden*\test.php on line 2
this is the only contents of the file :
Code: Select all
<?php
$p = $_GET['p'];
if($p == "") {
$p = "test";
}
include("$p.inc");
?>
can somebody help me with this ? (sorry to have posted alot recently but i love the fast responses here

)
Posted: Sat Aug 14, 2004 3:08 pm
by evilmonkey
Posted: Sat Aug 14, 2004 3:10 pm
by Getran
i get the same error, cus it's not that causing the problem. Even tho i get the error it still includes the page...
Posted: Sat Aug 14, 2004 3:14 pm
by evilmonkey
That's not an error. That's PHP warning you of a vulnerability because you never defined an index in $_GET. Feel free to ignore that. Also, your PHP is set to display very strict notices, if that's a production server, that's very wierd. To get rid of that error, you can just put this line at the top of your code:
That should make the notice go away. (Sorry, I misread the error message, and thought it wasn't including properly).
Posted: Sat Aug 14, 2004 3:25 pm
by Getran
it didn't make it go away :/ i just got the same message for on that line
Re: problem with content loader
Posted: Sat Aug 14, 2004 3:28 pm
by scorphus
Getran wrote:(...) Notice: Undefined index: content in *hidden*\test.php on line 2 (...)
In this case it complains because you're trying to access an invalid 'content' index from an array ($array['content']) in *hidden*\test.php on line 2. Open test.php, look for this line 2 and see what's wrong.
-- Scorphus.