REQUEST_METHOD: POST
There are two ways to send the web input to the server-side scripts:
- POST method, which sends the web data to the server “behind the scenes” by putting it on the standard input, and
- GET method, by which the information that is entered into the form will be tacked on to the end of the target URL.
For an example of the POST method, consider the following form:
The input type names are
act
: showing which button is clicked,
email
: the email input field, and
password
: the password input field.
The standard input may contain the following string after submission:
act=Submit&email=userid@cs.und.edu&password=CSci513
In Perl, the $query->param
variable collects input values such as
print $query->param('act');
// “Submit”
print $query->param('email');
// “userid@cs.und.edu”
print $query->param('password');
// “CSci513”