Re: _POST & _GET
| From: | Rasmus Lerdorf | Date: | Tue, 12 Nov 2002 06:07:59 +0000 |
| Subject: | Re: _POST & _GET | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-123936@lists.php.net to get a copy of this message | ||
> ColdFusion developers are more familiar with the URL/form distinction
> than the get/post one, as the former are variable scopes. PHP developers
> generally use the get/post distinction due to the arrays $_GET and
> $_POST. As I understand it, mod_perl developers do not distinguish the
> two, though I have only heard this from one source (though he is a
> highly respected member of the mod_perl community). I am less certain
> about other communities.
Not that it matters, but the Get/Post/Cookie naming in PHP predates the
existence of the various $_GET or $HTTP_GET_VARS variables by quite a bit.
It was the naming that spawned the variable names, not the other way
around. I didn't make up these names. They are right out of the HTTP
spec. ie. <form action=... method=GET/POST>
It seemed obvious and natural to follow this convention in PHP. But yes,
the fact that you can have GET variables on a POST request is perhaps
somewhat confusing and perhaps the reason why other communities have
labelled this data as URL variables. However, I think it is very
confusing to call POST variables "form" variables as you can very easily
have GET-method forms in which case this "form" data now comes in a URL
variable.
Regardless, your explanation was excellent and I hope someone from the
documentation teams picks this up and puts it somewhere logical, with your
permission of course.
-Rasmus