[Zope] Re: [PHP] GET/POST "name=value" query var convention?
Rasmus Lerdorf
rasmus@php.net
Thu, 2 Aug 2001 16:45:28 -0700 (PDT)
> Does anyone know of a more-or-less authoritative source that states
> that the common convention for HTTP GET/POST queries is a series of
> "name=value" pairs joined by "&" characters? I know I'm not just
> making this up, but I need to persuade someone that it is a
> commonly-accepted practice. Before you look... it's not in the HTTP
> RFCs.
Read the CGI Specification, or simply create a GET method form and submit
it with a couple of different browsers and look at the URL it sends.
There isn't much arguing with this.
> Also...would it be accurate to say that life as a PHP and/or
> ColdFusion programmer is easier if the aforementioned HTTP GET/POSTs
> are performed in this manner? I know as a frequent user of Perl's
> CGI.pm module that I take this convention for granted.
Sure, but technically the separator shouldn't actually be & it should be
& or simply ;
In PHP you can change this in your php.ini file with the arg_separator
directive. But since most browsers don't send GET-method forms this way
it is somewhat pointless unless you are building something where you have
full control over the clients that access your server.
By the way, that was a pretty crazy cross-post!
-Rasmus