HTML and CSS Reference
In-Depth Information
Now that we've got the form
finished, can we talk about the method
the browser uses to send this data to the
server? We've been using POST, but you
said there are other methods, too.
There are two primary methods the
browser uses: POST and GET.
POST and GET accomplish the same thing—getting
your form data from the browser to a server—but in
two different ways. POST packages up your form
variables and sends them behind the scenes to your
server, while GET also packages up your form variables,
but appends them on the end of the URL before it
sends a request to the server.
With POST, all the form data is sent as part of
the request and is invisible to the user.
POST
The user jus t sees
the server s cript's
URL in her browser
address bar .
Server
Script
http://wickedlysmart.com/hfhtmlcss/contest.php
With GET , the form data is added to the URL
itself, so the user sees the form data.
Notice the form
data added on
to the end of
the URL. This
is what the
user sees in the
address bar.
GET
Server
Script
http://wickedlysmart.com/hfhtmlcss/contest.php?firstname=buckaroo&lastname=banzai
Search WWH ::




Custom Search