Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
July 17, 2004, 6:26 pm
rate this thread
I just set a local site that supports php4 on mac os x.
My pages are served fine, I cannot pass any variables to php using my
navigation browser bar: http://localhost/mypage.php?page=yoga for
instance does NOT set the page variable to anything (echo " page=
$page"; is empty)
the exact same code for my page.php on another server works fine.
Is there any setting on apache or php.ini that enable the question
mark and passing variables ? What is the proper way?
Re: Newbie question: variable setting trough question mark
That's because the option register_globals is off by default in recent
PHP for certain reasons.
register_globals is enabled there, but you shouldn't rely on that.
The correct way is to use the superglobal array $_GET to access URL
variables, $_GET['page'] in your case.
Have a look at the manual for details.
Using Register Globals
- » Need help with https socket proxy server connection
- — Previous thread in » PHP Scripting Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum