CS 561 - Lecture Notes
Forms






# ***************************************************************
# Extract information from a crisis reporting form
#

$request_method = $ENV{'REQUEST_METHOD'};
if ($request_method eq "GET") {
$query_string = $ENV{"QUERY_STRING"};
} elsif ($request_method eq "POST") {
read (STDIN, $query_string, $ENV{"CONTENT_LENGTH"});
} else {
&method_error (500, "Method Error",
"This is an unsupported method");
}