CGI Form Processing Using Form Maps |
A CGI form transmits data to a
CGI program. When data is transmitted from a CGI form, the data is sent to the
Web server using the Hypertext Transfer Protocol ( HTTP).
The Web server then executes the CGI program specified by the input form and
sends the form data to it as standard input. When this data is received by the
CGI program the name/value pairs can be placed in the os_form_map
. The CGI program then processes the information and
creates a Web page on the fly.
The class os_form_map
is a container for name/value pairs transmitted from an os_form
. Designed for use with an os_form , an os_form_map
greatly simplifies the task of parsing form data into easily accessed name/value
pairs.
Name/value pairs are stored
internally in an STL multimap . This underlying
container is exposed through the member function fields()
to allow application-specific manipulation of the form data.
Using the data transmitted from the input form, this illustration shows the Web<ToolKit> code for a CGI program used to process the data. It also shows the HTML generated, and the resulting Web page created by the CGI program.


Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved - For use by licensed users only.