View Full Version : $_POST vs. $HTTP_POST_VARS
03-12-2008, 10:33 PM
Recently there has been a few arguments about which is better. I always tend to use $_POST but somebody said that I should use $HTTP_POST_VARS instead. So, which one is better to use?
I just wanna clear this up making sure i'm not compromising security of scripts a work on or anything of the sort.
Thanks for the help,
03-12-2008, 10:36 PM
HTTP_POST_VARS is deprecated and I think removed in PHP5 so you tell us. Read this page: http://us.php.net/reserved.variables
03-12-2008, 10:38 PM
Yes well...that may explain a bit...still its always best to be sure.
03-13-2008, 01:44 AM
It might be worth mentioning that the $_POST array (all the short name arrays) was introduced in PHP 4.1.0, released 10-Dec-2001. The long array names were disabled by default in PHP 5.0 and are completely eliminated in php6.
03-13-2008, 02:25 AM
I still find it odd they never patched $HTTP_POST_VARS for security issues, instead they just made something new doing very similar and renaming it.
I like it now though it is shorter so I suppose it is not all bad ~_~ just odd is all
03-13-2008, 05:23 AM
It's likely so that people didn't use the same superglobal variables in one version, and then complain that it didn't work the same in later versions (like what's currently happening with Internet Explorer). :)
03-13-2008, 06:51 AM
Thank you all for the clarifications, now I can prove somebody wrong...lol... And help him fix his scripts. :)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.