Re: Apache + php: url arguments empty
On Sun, 2006-06-11 at 23:22 +0200, Lothar Braun wrote:
> Hi,
>
> On Sunday 11 June 2006 22:40, Johan de Jong wrote:
> > The document root contains an index.php:
> >
> > <?php
> > printf("mytag has value: %s\n", $mytag);
> > ?>
> >
> > My problem is that when I load the page using:
> >
> > http://localhost/?mytag=a
> >
> > the value of mytag is empty. I stumbled on this problem when migrating
> > an existing and working webpage.
>
> You have to turn register_globals to ON in your php.ini
>
> But you might want to have a look at http://de2.php.net/register_globals
> before you reenable this feature (and learn why it was disabled :D)
>
> Regards,
> Lothar
>
>
Exactly, and you should leave it disabled also, for security reasons.
You can pass tags via $_GET['mytag'] instead of $mytag.
--
Szia:
Nyizsa.
Reply to: