CGI and forms
What are CGIs?
CGI stands for Common Gateway Interface, and are scripts, programs, written in a programming language or scripting language, that perform functions not available in HTML.
For example, when a form requests information, or when a search is to be conducted, a program needs to receive the request, decode the variables, perform an action, and reply to the request. The following image illustrates the process:
.
- The Browser recognizes a tag (ISINDEX or FORM) requesting a cgi from the server, and sends a request to the server.
- The Server checks the request, identifies the CGI to be used, and requests the services of the Scriptserver.
- The Scriptserver (that can be located or not in the same place of the Server) receives the request, decode it, performs an action, and returns the results to the Server.
- The Server receives the results from the Scriptserver and sends them to the Browser.
Detailed information on CGIs
Forms and search
- Searches can be of two types: document-based queries, or form-based queries.
- Document-base queries use a special tag ISINDEX, and can only do search on a limited number of words.
- Form-based queries can use a variety of items like buttons, text, etc. They are far more powerfull than document-based queries.
- Forms can be used for a variety of purposes, including mailing information, performing queries, etc.
- Both forms and search require CGI scripts to work properly.
Detailed information on Forms, search and forms, and CGI
Using FormMail to decode form information
This description applies to the use of FormMail with Windows NT, particularly at the Merrick School of Business, University of Baltimore.
- Read the tutorial at the MIS Server and save a copy in your account.
- Design your form and include <FORM METHOD="POST" ACTION="http://mis.ubalt.edu/cgi-bin/FormMail.pl"> as your request for form decoding. This will only work with pages at University servers.
- Be sure to read carefully the tutorial and the second example also available in the end of the tutorial. Some NAME=" " values are required for the script to work properly.
NOTE: advanced users with access to a Windows directory that can run CGIs can implement FormMail in their accounts as follows:
- save cgi-lib.pl and mail-lib.pl in their Perl/Lib directory
- save Form.Mail.pl in the cgi-bin directory of their Web Server.
- modify the URL of the FormMail.pl script to the URL of their own server.
This page is maintained by Al Bento
who can be reached at abento@ubalt.edu. This page was last updated on March 2, 2010. Although we will attempt to keep this information accurate, we can not guarantee the accuracy of the information provided.