Using the method "get" in a form to pass data, all the input that the user types is put in the QUERY_STRING variable: |
<form method=get action="http://www.some.box/name.pl"> |
Type your first name <input name="First Name"><br> |
Type your last name <input name="Last Name"><br> |
<input type=submit value="submit"> |
</form> |
If the user types "Winona" and "Ryder" as values, the QUERY_STRING environment variable would have the encoded value "First+Name=Winona&Last+Name=Ryder". |
Here is a Perl program that would print that string on the web client's window (without regular html tags): |
#!/usr/local/bin/perl |
print "Content-type: text/html\n\n"; |
print "You typed \"$ENV{QUERY_STRING}\" in the input boxes\n"; |
Method=Get is NOT RECOMMENDED for forms as long input can be lost! |