RE: [PHP] Variables not working
| From: | Philip Olson | Date: | Sat, 27 Apr 2002 03:18:41 +0000 |
| Subject: | RE: [PHP] Variables not working | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94853@lists.php.net to get a copy of this message | ||
Read these:
Variables from outside PHP:
http://uk.php.net/manual/en/language.variables.external.php
It gives an example using $HTTP_POST_VARS. This is but
one predefined variable, others can be read about here:
Predefined Variables:
http://ca.php.net/manual/en/language.variables.predefined.php
Also consider extract and import_request_variables, I posted
a bit about them awhile back here:
http://marc.theaimsgroup.com/?l=php-general&m=101803683730027
And when in doubt, send your script to a call of phpinfo() and
it'll provide a ton of useful information.
Regards,
Philip Olson
p.s. the above links contain links, see those too :)
On Sat, 27 Apr 2002, baldey_uk wrote:
> Sorry let me rephrase that ' can anyone point me to good docs about passing
> variables between html and php' please?
>
> Cheers
>
> baldey_uk
>
> -----Original Message-----
> From: Nathan [mailto:etherwolf@sopris.net]
> Sent: 27 April 2002 02:34
> To: Rasmus Lerdorf; php-general@lists.php.net; baldey_uk@SoftHome.net
> Subject: Re: [PHP] Variables not working
>
>
> Before you get carried away with registering globals, try echoing:
> $_SERVER["HTTP_USER_AGENT"];
>
> Or, for versions prior to 4.1.X, change that to:
> $HTTP_SERVER_VARS["HTTP_USER_AGENT"];
>
> Registering globals is insecure unless you are VERY careful about how every
> variable you have is
> defined...
>
> Cheers,
>
> # Nathan
>
> ----- Original Message -----
> From: "Rasmus Lerdorf" <rasmus@lerdorf.ca>
> To: "baldey_uk" <>
> Cc: <>
> Sent: Friday, April 26, 2002 6:41 PM
> Subject: Re: [PHP] Variables not working
>
>
> Turn on register_globals in your php.ini file.
>
> On Sat, 27 Apr 2002, baldey_uk wrote:
>
> > Hello all, im not sure if its my installation or if on doing something
> wrong
> > but i cant seem to use any of the variables from forms that i PUT to. Or
> any
> > full stop! even
> >
> > <?php echo $HTTP_USER_AGENT; ?>
> >
> > doesnt out put anything. Anyone seen this before?
> > thanks in advance for your help
> >
> >
> > Cheers From
> >
> > baldey_uk
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>