Re: Passing variables to another page - newbie
| From: | Philip Olson | Date: | Sun, 06 May 2001 19:57:34 +0000 |
| Subject: | Re: Passing variables to another page - newbie | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51656@lists.php.net to get a copy of this message | ||
index.php?fruit=apple&color=green&lang=php
If register_globals setting in php.ini configurations is 'on'
then the following should all work :
echo $fruit; // apple
echo $color; // green
echo $lang; // php
echo $HTTP_GET_VARS['fruit']; // apple
echo $HTTP_GET_VARS['color']; // green
echo $HTTP_GET_VARS['lang']; // php
If register_globals setting is off, access them through
HTTP_GET_VARS, as $fruit and $color will NOT exist. See :
http://php.net/manual/en/configuration.php#ini.register-globals
Also see :
http://php.net/manual/en/language.variables.php
http://php.net/manual/en/language.variables.external.php
http://php.net/manual/en/language.variables.predefined.php
regards,
philip