Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTTP_POST_VARS vs _POST ?

Status
Not open for further replies.

Alterac

Technical User
Joined
Jun 19, 2002
Messages
171
Location
CA
Can someone tell me why I shouldnt be using the HTTP_POST_VARS and HTTP_GET_VARS and such like that?

Would my way be more Global? as in works across more versions of PHP or not?
 
I assume from your thread title that your question is the reasons for using $_POST over $HTTP_POST_VARS.

$_POST and $HTTP_POST_VARS both will contain the same information. The difference between them is that $HTTP_POST_VARS is a normal variable whereas $_POST is superglobal -- that meaning it is available in all contexts, even inside a function. To use $HTTP_POST_VARS inside a function, you must use the global operator.

$_POST and its cousins are only available in PHP versions newer than 4.1.0

Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Similar threads

Replies
8
Views
583
  • Locked
  • Question Question
Replies
5
Views
376
Replies
8
Views
401
Replies
9
Views
282

Part and Inventory Search

Sponsor

Back
Top