What is the difference between using $HTTP_POST_VARS
for accessing POST variables?
The difference between $HTTP_POST_VARS
is that one is depricated, and one is not. $HTTP_POST_VARS
(and others such as GET, SERVER, ENV, COOKIE, etc.) were all renamed in PHP 4.1.0 to variables such as $_POST
, and so on. In later versions of PHP (possibly PHP6) they will be eventually removed.
It is noteworthy to say that the $HTTP_POST_VARS
array and the $_POST
superglobal array are not references...that is to say, they are separate variables. Changing the value of $_POST['foo']
will not modify the value of $HTTP_POST_VARS['foo']