Knowledge Network Explorer / Education First

 

Getting Started with CGI

Make your Web site more meaningful with online quizzes, database interfaces, and more! This overview will introduce basic CGI concepts, programming languages, and tools to help you put your Web sites and learners to work.


What is CGI?

The Common Gateway Interface (CGI) is a standard for interfacing Web servers with applications. A plain HTML document on the Web is static -- a text file that doesn't change. A CGI program, on the other hand, can output dynamic information, making a Web page more useful for learners. In other words, a CGI program does something with the stuff users type into forms.

You can use CGI's for searching, gathering or sharing database information, online quizzes, generating Web pages, and more. How about online portfolios, guestbooks, or district data collection?

Here are some examples:

 


How Does CGI work?

CGI programs run on the server and are thus less prone to client idiosyncrasies that make JavaScript development a challenge.

Here's the usual chain of events:

client form - server - cgi - server - client


CGI Languages and Tools

Some popular CGI programming languages include AppleScript, C/C++, Perl, and Visual Basic. Of these, Perl is probably the most widely used. Perl is free, powerful, portable (Macintosh, Windows, and UNIX), readily available, and fairly easy to learn.

You can use Perl to create database interaction CGI's, but many people appreciate the ease of higher level tools such as Everyware's Tango and Web FM. These tools will help you build Web page forms that let remote users search or add to your database.


Getting Started with CGI

To create your own CGI's, you'll need access to a Web server. It's helpful to have solid understanding of HTML and some exposure to HTML FORM tags. It's nice to have cooperation from a system administrator to help you install software and troubleshoot.

Strategy for Learning Perl


Resources