Click here for the greatest Web tools and resources.
Click here for the greatest Web tools and resources.


BUILDER.COM

Search for articles on BUILDER.COM:

 
 
 
 
 
 
 
 
 
 
The abc's of CGI
 
by Matt Rotter
(9/23/97)

So you've learned HTML; maybe you're even a master at it. But if you want your site to actually do something--if you want it to customize itself to its users or if you want to gather information through HTML forms--you'll have to go beyond HTML. You'll have to delve into Web programming, the most common form of which is the common gateway interface, or CGI.

There are, of course, other ways to add customization and interactivity to your Web site. Client-side scripting languages, such as JavaScript, are popular for actions like validating data-entry fields. And for complex Web applications, the use of the Netscape Server Application Programming Interface (NSAPI) and the Internet Server Application Programming Interface (ISAPI) are increasingly common. But if you just want to add simple interactive features to your site--an email form or the dreaded page counter, for example--CGI is still the easiest way to go.

what is CGI?
when to use CGI
hosting issues
how to:
process a form
use cookies to personalize Web pages
use cookies with server-side includes
create a simple guest book
add a page-visit counter
troubleshooting
But before you dive into writing your own CGIs for your Web site, there are a lot of things you need to know. First, of course, is just what CGI is and when to use it. You also need to address some hosting issues for your CGIs. And if you run into problems using your new programming skills, check out our tips for solving common problems.

CGI may seem a little intimidating, but transforming static HTML pages into interactive Web sites is well worth the trouble.

Matt Rotter is technical producer for CNET.COM, which means he spends a lot of time developing special sections and pages that feature cool things like dynamic HTML. In his spare time, he teaches CGI classes.

Editor's note: the Perl samples included in this story assume that you will be running your CGI programs on a Unix system. Please check with your ISP to make sure this is the case.

what is CGI?


 

Click here for the greatest Web tools and resources.
Click here for the greatest Web tools and resources.

Back to top  Go to the BUILDER.COM home page.

  Copyright © 1995-98 CNET, Inc. All rights reserved. Privacy policy.