On Fri, 2006-04-28 at 14:27 -0400, Jay Savage wrote:

> POST and GET aren't CGI...at least not exactly. They're part of the
> HTML spec, and deal with what happens when you click the submit button
> on an HTML form.

No, they are part of HTTP, not HTML.

> GET appends the form elements to the url, POST embeds
> them in the body of the transmission.

Well. Ish. That describes how form data is transmitted with POST and
GET, but there is a little more to it than that.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3

> Sorting them out is the job of the server, not the CGI program; CGI.pm could 
> care less.

The server just dumps the data into the CGI, either as environment
variables or through STDIN. CGI.pm cares very much about how the data is
formatted, it decodes it for you.

> Values of GET and POST requests are accessed by your CGI program in 
> exactly the same way: $q->param{'param'}.

Because CGI.pm is quite smart.

-- 
David Dorward                           <http://dorward.me.uk/>
"Anybody remotely interesting is mad, in some way or another."
                             -- The Greatest Show in the Galaxy

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to