Handling Form Data on the Server
In conventional CGI programming, the URL in the action attribute of a form will identify an executable file somewhere in the Web Server’s document hierarchy.
A common server convention is that these executables live in a subdirectory of cgi-bin/
The executable file may be written in any language. For definiteness we will assume it is written in Perl, and refer to it as a CGI script.
The Web Server program will invoke the CGI script, and pass it the form data, either through environment variables or by piping data to standard input of the script.
The CGI script generates a response to the form, which is piped to the Web server through its standard output, then returned to the browser.