On October 14, 2014 at 10:04:00 AM, Andrea Faulds (a...@ajf.me) wrote:

On 14 Oct 2014, at 14:53, Chris Wright <c...@daverandom.com> wrote:  

> Also, I think Mike got the naming right there as well, $form is the  
> accurate description of what it is.  

You’re right, actually. multipart and url-encoded are usually produced by 
forms, and other types of request bodies (JSON, plaintext) don’t end up in 
$_POST.  

So $_QUERY and $_FORM, then. That sounds about right.  

I suppose $_QUERY is *technically* incorrect for similar reasons, in that if 
you have a plain parameter-less query string (e.g. 
http://example.com/foobar.php?query%20string) it won’t end up in $_GET… but I 
don’t think that’s widely used, and there are only two formats that come after 
the question mark. If you really need the raw string, it’s in $_SERVER anyway. 
So that’s not really a problem.  
--  
Andrea Faulds  
http://ajf.me/  


Did I just name a global variable? W00t!

Anyhow, yeah neither one is technically 100% correct, but like Andrea said, the 
majority of usage will be from forms and query strings with parameters. At any 
rate, it’s makes more sense semantically in the context of what the var 
actually contains than $_GET and $_POST ever will.

—
Mike Dugan
m...@mjdugan.com

Reply via email to