By using the GET method, the input values from the form are sent as part of the URL, and saved in the environment variable.
For an example of the GET method, consider the following form:
In Perl, the variable collects input values in the query string such as
The GET method is not a secure method of sending data since the data is passed through as part of the URL, which will show up in the web server’s logfile.
The advantage of the GET method is the page can be retrieved again by entering the URL.
For example, after submit the keywords: and to the Yahoo, the URL is changed to the following string:
and the variable values are = “PHP MySQL” and = “UTF-8” if the Yahoo Search uses Perl.
Spaces and some special characters are not allowed in URLs.
The code ‘+’ is for the space ‘ ’ and the hexadecimal ASCII code ‘%40’ is for the symbol ‘@’ in URLs.