GPearce
12-17-2007, 04:30 PM
I've recently tried my hand at coding, and I put together a script I'm rather proud of, and i'm just finishing it to run on my site. However, on inspecting my 30meg error log, for a totally unrelated problem, i found this:
[client 86.163.116.191] PHP Notice: Use of undefined constant p - assumed 'p' in /var/httpdocs/appbeta.php on line 5
[client 86.163.116.191] PHP Notice: Use of undefined constant title - assumed 'title' in /var/httpdocs/appbeta.php on line 10
[client 86.163.116.191] PHP Notice: Use of undefined constant header - assumed 'header' in /var/httpdocs/appbeta.php on line 11
[client 86.163.116.191] PHP Notice: Use of undefined constant content - assumed 'content' in /var/httpdocs/appbeta.php on line 12
[client 86.163.116.191] PHP Notice: Use of undefined constant p - assumed 'p' in /var/appbeta.php on line 5
[client 86.163.116.191] PHP Notice: Use of undefined constant title - assumed 'title' in /var/appbeta.php on line 10
[client 86.163.116.191] PHP Notice: Use of undefined constant header - assumed 'header' in /var/httpdocs/appbeta.php on line 11
[client 86.163.116.191] PHP Notice: Use of undefined constant content - assumed 'content' in /var/path/appbeta.php on line 12
Now my script, appbeta, works fine when It's run, but every time it is, it throws those up.
This is the extract of the PHP notice'd lines:
$pageid = $_GET[p];
$dataquery = "SELECT * FROM gp WHERE page='" . $pageid . "'";
$dataqueryaction = mysql_query($dataquery);
$numrows = mysql_num_rows($dataqueryaction);
$data = mysql_fetch_array($dataqueryaction);
$title = $data[title];
$header = $data[header];
$content = $data[content]; ?>
What's wrong with that? The page is accessed as appbeta.php?p=[pagename] ; where have I gone wrong?
Would massively appreciate your input :)
Thanks!
[client 86.163.116.191] PHP Notice: Use of undefined constant p - assumed 'p' in /var/httpdocs/appbeta.php on line 5
[client 86.163.116.191] PHP Notice: Use of undefined constant title - assumed 'title' in /var/httpdocs/appbeta.php on line 10
[client 86.163.116.191] PHP Notice: Use of undefined constant header - assumed 'header' in /var/httpdocs/appbeta.php on line 11
[client 86.163.116.191] PHP Notice: Use of undefined constant content - assumed 'content' in /var/httpdocs/appbeta.php on line 12
[client 86.163.116.191] PHP Notice: Use of undefined constant p - assumed 'p' in /var/appbeta.php on line 5
[client 86.163.116.191] PHP Notice: Use of undefined constant title - assumed 'title' in /var/appbeta.php on line 10
[client 86.163.116.191] PHP Notice: Use of undefined constant header - assumed 'header' in /var/httpdocs/appbeta.php on line 11
[client 86.163.116.191] PHP Notice: Use of undefined constant content - assumed 'content' in /var/path/appbeta.php on line 12
Now my script, appbeta, works fine when It's run, but every time it is, it throws those up.
This is the extract of the PHP notice'd lines:
$pageid = $_GET[p];
$dataquery = "SELECT * FROM gp WHERE page='" . $pageid . "'";
$dataqueryaction = mysql_query($dataquery);
$numrows = mysql_num_rows($dataqueryaction);
$data = mysql_fetch_array($dataqueryaction);
$title = $data[title];
$header = $data[header];
$content = $data[content]; ?>
What's wrong with that? The page is accessed as appbeta.php?p=[pagename] ; where have I gone wrong?
Would massively appreciate your input :)
Thanks!
