Form Processing

Forms are processed when an input button is pressed within the form.

The processing of the form is specified by the ACTION parameter in the <FORM> tag.

  <FORM METHOD=method ACTION=action>
    inputs
  </FORM>

The ACTION parameter (processing engine) should be an executable program. This should be placed in whatever you've defined as your cgi-bin directory (see the ScriptAlias entry in your srm.conf file in the httpd configuration).

METHOD can be one of the following:

  1. POST
  2. GET

Examples:


GET

This method has been withdrawn. See documentation on obsolete features for information on the GET method.

The GET method is the default on older versions of Mosaic. This generates massive url names as the contents of the forms are retained in the url names.


POST

When the submit button is pressed, the FORM details are written out into a file and the program defined by the ACTION parameter is called.

The program will parse the data sent by the issuing URL and write the contents to an output file. The names of the input and output files are passed to the program in environment variables.

output_file
This is the file that your browser reads after the program specified by the ACTION parameter has finished.

CONTENT_FILE input
the file containing the formatted form contents. The same formatting as in the GET method:
field1=field1 contents&field2=field2 contents&...&fieldn=fieldn contents&

The first two line of the output file must be:

  Content-type: text/html

The second line is a blank line and separates the header information
from the body of the response.