Re: Cannot read variables
| From: | Adam Zey | Date: | Tue, 06 Jun 2006 15:13:57 +0000 |
| Subject: | Re: Cannot read variables | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237462@lists.php.net to get a copy of this message | ||
William Stokes wrote:
Yess! Wrong ini file... There seems to be 3 of them on the same PC for some reason? -W "David Otton" <phpmail@jawbone.freeserve.co.uk> kirjoitti viestissä:kefa82dmelcq9l5a2a99gtvihjhpcdd8co@4ax.com...Turn off register globals. Now. It is a HUGE security hole. You do NOT need it turned on to use $_GET or the other superglobals, and there is in fact no reason at all to EVER turn it on. The only conceivable reason that someone would enable it is for an old badly written script, and in that case one has to question why they are running an old badly written script :) Regards, Adam Zey.On Tue, 6 Jun 2006 10:36:12 +0300, you wrote:I just set up a test box for PHP/MySQL on a WinXP box and now I'm having trouble with variables passed to browser from a link. For example I have a link that outputs this: http://localhost/index.php?team=CF10b. Now the CF10b cannot be user in the code like it should. I turned to Register Globals on in the php.ini but that didn't help. Any ideas?Most likely you didn't turn RG on (typo? wrong php.ini?), or didn't restart. Try: print_r ($_POST); print_r ($_GET); print_r ($_REQUEST); to see if your variable is being passed. If it is, PHP isn't set up as you want it. If it isn't, there's something more fundamental wrong. -- http://www.otton.org/