Q: What is the difference between using
$HTTP_POST_VARS and
$_POST for accessing POST variables?
A: The difference between
$HTTP_POST_VARS and
$_POST 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,
$_GET,
$_SERVER,
$_ENV,
$_COOKIE, 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'].
References:
Predefined Variables