943,381 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4601
  • PHP RSS
Jan 12th, 2005
0

$_POST - What does it mean?

Expand Post »
Hi guys,

I have been looking at various form processing scripts, bascially to gain some understanding of how they work.

I have managed to work through one section apart from one bit. I keep seeing the following:

PHP Syntax (Toggle Plain Text)
  1. $_POST

I was just wondering what this was. I am using Dreamweaver MX and it changes the colour of every $_POST. So it doesnt look like a variable.

Can someone explain what it is and what it does - or is it just a variable for something?

Thanks,
JameZ
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nikez is offline Offline
13 posts
since Jan 2005
Jan 12th, 2005
0

Re: $_POST - What does it mean?

I think i know what this is now....is it a replacement for the $HTTP_POST_VARS function?

Basically it stores the data from a form that has been submitted with the post action. Is that right?

J
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nikez is offline Offline
13 posts
since Jan 2005
Jan 12th, 2005
0

Re: $_POST - What does it mean?

Yup. its a way to pass data from one page to another. you could call it a variable but as you say its moved around by HTTP rather than php scripts temselves.
and yes it is a replacement for HTTP_POST_VARS .. somewhat shorter and easier to remember dont you think
Reputation Points: 12
Solved Threads: 5
Junior Poster
ReDuX is offline Offline
127 posts
since Sep 2004
Jan 12th, 2005
0

Re: $_POST - What does it mean?

hehehe....yeah a lot easier to remember. Its just i have 2 EXCELLENT books that i have learnt PHP from but neither of them mention $_POST....when i found out that it was a replacement for HTTP... i found it in one of them immediately!

You said its a way to pass data from one page to another....how exactly? Is it JUST a way to pass info from an HTML form to a php script? Or can you pass php variable data from a php script to another php script?

JameZ
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nikez is offline Offline
13 posts
since Jan 2005
Jan 12th, 2005
0

Re: $_POST - What does it mean?

Well yes because its passed using the HTTP headers you can use it for anything from php to ASP to javascript etc.
When requesting a page page.html for example. the header requests it using the URL http://www.domain.com/page.html .
If you pass data in the '$_POST' http variables it is also sent in the header in the form of a string (9 think POST is invisible and GET is visible, i forget which way round that is though) eg. http://www.domain.com/page.html?vari...something_else and so on
You can then call this information for use in say and email script or whatever use you may have for it.
Reputation Points: 12
Solved Threads: 5
Junior Poster
ReDuX is offline Offline
127 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Accessing $_POST values - Its not working :(
Next Thread in PHP Forum Timeline: Passing variables into form fields





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC