Help Me Understand PHP5, register_globals=off, $HTTP_POST_VARS, and $_POST

From: Date: Wed, 13 Oct 2004 07:08:32 +0000
Subject: Help Me Understand PHP5, register_globals=off, $HTTP_POST_VARS, and $_POST
Groups: php.general 
Request: Send a blank email to php-general+get-199341@lists.php.net to get a copy of this message
Hello, I've done some homework on my own by reading through PHP documentation and various articles; however, I am still a bit confused as to what is supported in PHP 5.0 when register_globals is set to off. In PHP5.0, if the register_globals parameter is set to off (as it is by default), I know that we're supposed to use the $_POST super globals to access the post variables. My question is, is the $HTTP_POST_VARS global still populated for backwards compatibility? In other words, if I have an old script that has the following piece of code running on a PHP5.0 environment with register_globals off (after submission of a form), would it still work as expected? Function someFunction($variable) { global $HTTP_POST_VARS; return IsSet($HTTP_POST_VARS[$variable]) } Thanks in advance for your help.

« previous php.general (#199341) next »