CGI Forms   «Prev 

Simple Form Perl - Exercise

A simple forms example

Test an example of an HTML form and corresponding CGI program on your server.
For this exercise, you will want to reference the formtest.html and formtest.cgi files you have already downloaded (right :>) from the Resources page.
First, make an HTML file like formtest.html, and put it on your server. When you load it with your browser, you should see something like this:

Perl CGI Form

Remember to change the name in the form's ACTION attribute to point to the correct URL for the CGI program on your server.
What CGI program? Now make a Perl program like formtest.cgi, and load it in your server at the proper location for running CGI programs.
Load up your browser and fill in the form. When you press the submit button, you should see something like this:


Response page from form submission

Experiment with the form until you are satisfied that you understand the HTML (the CGI will come later). Then, click the Submit button.