Slide 3.9: Writing CGI scripts Slide 3.11: CGI security concerns Home |
REQUEST_METHOD
: GET
or POST
REQUEST_METHOD
: GET
QUERY_STRING
environment variable. The advantage of the GET
method is the page can be retrieved again by entering the URL. For example, after submit the keywords: CGI
and Perl
, to the Yahoo, the URL is changed to the following string:
http://search.yahoo.com/bin/search?p=cgi%20perlThe
GET
method is not a secure method of sending data since the data is passed through as part of the URL, it will show up in the web server's logfile. The following demonstration shows an example of the GET
method:GET
method uses the function url_param
to retrieve web input:
|
REQUEST_METHOD
: POST
email
, password
, and button
, respectively, the standard input may contain the following string after users enter the requested information and submit:
email=userid%40cs.und.edu&password=351&button=customerThe following demonstration shows an example of the
POST
method: