Gossamer Forum
Home : General : Internet Technologies :

PHP playing up :(

Quote Reply
PHP playing up :(
Can't anyone who knows the basics of PHP let me know why this is working? Its either something *VERY* stupid, or PHP is misconfigured Frown All it does is return a blank value...

Code:
<?

global $p;

echo $p;

?>

I'm calling it with page.php?p=test . Theoretically it should print 'test' Unsure

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] PHP playing up :( In reply to
Sounds like register globals is off (as it should be. big security nightmare with that on)

try it as

echo $_GET['p'];

--mark

Last edited by:

Mark Badolato: Apr 29, 2003, 8:03 AM
Quote Reply
Re: [Mark Badolato] PHP playing up :( In reply to
Eugh....stupid me! You are absolutly correct. I knew it had to be something to do with either a PHP setting, configuration, or a REALLy stupid boo-boo in my code.

Thanks for that.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!