CGI Basics

The CGI (Common Gateway Interface) is described under http://www.w3.org/. To make it short, simply think of CGI as a program which outputs (printf()) HTML code to the console, if it is invoked from the command line. When the web server invokes it, the environment variable "QUERY_STRING" is passed, which contains everything you appended to the "?" at the end of the URL. The output of the program is captured by the web server and passed via the network to the web browser.

Christian Barmala