Re: problems with post
| From: | Jacek Bochenek | Date: | Fri, 15 Sep 2000 08:41:28 +0000 |
| Subject: | Re: problems with post | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16904@lists.php.net to get a copy of this message | ||
Hello,
> > I have a script that has this:
> >
> > <?
> > if (isset($data)) {
> > echo "OK";
> > }else{
> > echo "Bad news!";
> > }
> > ?>
> >
> > and I run the script like this:
> >
> > http://website.com/script.php?data=somthing
> >
> > and it gives me a "Bad news!" answer.
> >
> > What can be wrong? I compiled it with the same options that I used in my
past
> > php4 instalations.
>
>
> Hi, I tried this on a PHP-4.0.1 and it works great, but not on php-4.0.2.
For
> some reason the get/post doesn't work. What can it be?
Try checking register_globals setting in php.ini file. It should be set to
on if you want to use post, get, etc environment variables as globals. Maybe
in php-4.0.2 it is turned off by default. I've found an interesting line in
http://www.php.net/manual/html/language.variables.predefined.html:
"Note: As of PHP 4.0.3, track_vars is always turned on, regardless of the
configuration file setting."
I'm assuming they meant "PHP 4.0.2" and maybe at the same time they disabled
register_globals.
Jacek Bochenek
---
"Smile, tomorrow will be worse!"