The script receives the data in the form
variable1=value1&variable2=value2&variable3=value3
and so on for as many variables as are used. The script splits the variable-value pairs apart, does whatever calculations it wants using the values, and returns to the browser a new page. It may also do other things such as initiate e-mail.
The next slide shows a Perl script that handles the form with the zip code field.
Writing CGI scripts is beyond the scope of this ProForum, but writing an HTML form is not.