FILL-OUT
FORMS
THROUGH
WWW
COMMON
GATEWAY
INTERFACE
The following examples demonstrate
Common Gateway Interface.
The source
code for decoding these examples is a
simple Ch CGI program called
form.ch. If Ch CGI has been setup properly in
your Web server, this program is
located in your_web_server_cgi-bin/chcgi/form.ch.
This Ch program
can handle both
METHOD=POST
and
METHOD=GET
.
- Example 1 -- a ludicrously simple
fill-out form.
- Example 2 -- three text entry fields.
- Example 3 -- text entry fields and
checkboxes.
- Example 4 -- changing the default
values of text entry fields and checkboxes.
- Example 5 -- changing various
attributes of text entry fields.
- Example 6 -- multiple, independent
forms in a single document.
- Example 7 -- radio buttons, "one of
many" behavior.
- Example 8 -- password entry fields.
- Example 9 -- option menus.
- Example 10 -- scrolled lists with
single and multiple selections.
- Example 11 -- multiline text entry areas.
- Example 12 -- image maps in forms.
- Example 13 -- forms with hidden elements.
- Example 14 -- form with multiple values for a single name.