Forum Moderators: coopster
I also noticed that:
$foo==$_POST['foo']
and
PHP_SELF==$_SERVER['PHP_SELF']
Global means that the var is available throughout the scope of the php, but I never read anything about this shorthand. With careful scripting and using distingushed vars, is it otherwise safe to call the requested variable directly?
What happens, for example, if you are expecting a certain variable to be sent using POST, and someone sends it in the query string?
Also, relying on these global variables ... they can reset variables if you don't code carefully.
As of later versions of PHP, register globals is turned off by default.
For further information about what register globals is, and why it may be "dangerous": [php.net...]