variable access
| From: | Si Ming | Date: | Fri, 14 Jun 2002 22:32:39 +0000 |
| Subject: | variable access | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-14223@lists.php.net to get a copy of this message | ||
I have register_globals = off and whenever I try to access a variable I MUST
use $_SERVER["var"], $_POST["var"], etc... Is there a way to just simply
access the variable as $var instead? I don't want to turn on
register_globals but I like to have short variable names... Someone has
told me that I can simply do a: $newvar = $_POST["var"]; I have tried that
and it doesn't work. Is it my configuration or is it simply because I have
register_globals set to off? Whenever I create variables, I have to refer
to them using $_SERVER["var"], is that necessary? Please Help.
Sim