| A Brief Introduction to CGI CGI stands for Common Gateway Interface. CGI progamming involves creating programs that receive their starting commands from a Web page. As in Java, the HTML of the Web page includes an instruction to start a program. The difference is that with CGI the program is run on the server, not on the user's machine. The programs themselves can be in any programming language that the server can run--C++, PERL, etc. PERL seems to be the most common programming language for CGI programs. A line like this would call up the program on the server from a link on a Web page: <A HREF="http://www.nowhere.com/program.cgi">This link calls up the program. </A> The most common way to call up a program on the server from a Web page is to include a form on the page. The user will then input data into the form, which the Web page then sends as parameters to the program on the server. The line that calls up the program might look like this: <FORM METHOD="GET" ACTION="/cgi-bin/program.cgi"> This line would begin a form on the Web page, and when the user clicks on "submit," the form data would be sent to the server to be run by the program. Generally, the program will then create and send a Web page back to the user. On this site, the Preliminary form page uses a CGI program that is part of the Microsoft FrontPage program. Sources of CGI information and programs: Back to Module Three
|