CGI Forms

By Herbert J. Bernstein
© Copyright 2004, 2010 Herbert J. Bernstein

Managing Common Gateway Interface (CGI) Forms

Web pages can contain forms intended to allow a user to provide data to be submitted to a program (an agent) for processing. The program may be on the same machine as the browser (on the "client-side") or on some other computer that serves web pages or mail messages or database accesses (on the "server-side"). For information on client side forms, see the discussion of Javascript Forms.

The rules for HTML forms are specified by the World Wide Web Consortium (W3C) in section 17 of the HTML specification (

A form element delimits any section of an HTML web page containing ordinary HTML markup (headings, paragraphs, tables, lists ...) between <form> and </form> tags and controls that a user can use to provide data.

There are two methods used by HTML forms to communicate with server-side programs: "get" and "post".