CGI Forms   «Prev  Next»

GET POST in Perl - Exercise

Test POST and GET

Take the formtest.cgi program from the previous lesson and make it work with either the POST or GET method. (You can download this file from the course Resources page.) Be sure to test it both ways.
Chapter 3 in The CGI Book contains a detailed description of the GET and POST methods. Paste your source code below and click the Submit button when you are finished.
In Perl, the (CGI) is a protocol which defines the interaction of web servers with an executable program in order to produce dynamic web pages. CGI enables the web server to send information to the program and the program then sends the information back to the web server which in turn can be sent back to the browser. GET and POST are not interchangeable and both of these types represent different operations. Proxy servers may cache the output of GET requests. GET method is the default method for all web request to pass the information from browser to the web server and it also creates a long string that shows up in the browser’s URL box. It sends the encrypted user information attached to the page request.