mcloan Posted October 29, 2006 Share Posted October 29, 2006 Can someone tell me what the difference is between $HTTP_POST_VARS and $Post?Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/25504-http_post_vars-vs-post/ Share on other sites More sharing options...
wildteen88 Posted October 29, 2006 Share Posted October 29, 2006 $HTTP_*_VARS are depreciated thats the only differenceYou should use the new superglobals.$HTTP_POST_VARS is $_POST$HTTP_GET_VARS is $_GET$HTTP_COOKIE_VARS is $_COOKIEetc.As of PHP5 they are turned off. To use these older style superglobals you'll need to turn a setting called register_long_arrays on. Otherwise just use the new shorter superglobals Quote Link to comment https://forums.phpfreaks.com/topic/25504-http_post_vars-vs-post/#findComment-116356 Share on other sites More sharing options...
Zane Posted October 29, 2006 Share Posted October 29, 2006 [quote=http://us2.php.net/manual/en/reserved.variables.php]HTTP POST variables: $_POST Note: Introduced in 4.1.0. In earlier versions, use $HTTP_POST_VARS. [/quote] Quote Link to comment https://forums.phpfreaks.com/topic/25504-http_post_vars-vs-post/#findComment-116357 Share on other sites More sharing options...
kenrbnsn Posted October 29, 2006 Share Posted October 29, 2006 Another difference is that $_POST is a superglobal array, which means that it can be seen throughout your script. The $HTTP_POST_VARS array can only be seen at the top most level of your script and it must be declared as global it you want to use it in funcitons.Ken Quote Link to comment https://forums.phpfreaks.com/topic/25504-http_post_vars-vs-post/#findComment-116396 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.