PDA

View Full Version : PHP Issues


csite
02-05-2007, 10:03 PM
I just signed up and started to get my database/vbulleitn community online.

I have a big problem. For some reason all my PHP files are not working and NOT outputting any errors - so I have no idea whats wrong.

Basically, I have a file called test.php... Everything at the beginning and end of test.php is shown online.

WHen I do this:

if($p=="page1") {
echo("PAGE ONE!!!");
}

it shows nothing.. When I go to test.php?p=page1 it shows everything outside the statement, but nothing inside the statement.

Im sure this is an easy fix and probably just in a config file somewheres - but Im a noob - Can anyone push me in the right direction?

Thanks a million.

csite
02-05-2007, 11:10 PM
Here is my test.php file:

<?php

echo("TEST SCRIPT!!!");

if($p=="page1") {
echo("This is page one.");
}

?>



When I go to test.php?p=page1 the only output is:

"TEST SCRIPT!!!"

epb
02-10-2007, 10:49 PM
Register globals is off by default. You'll need to either use $_GET['p'] to obtain the value of p, or turn on it on.

http://us3.php.net/manual/en/security.globals.php