Skip to main content.

Web Based Programming Tutorials

Homepage | Forum - Join the forum to discuss anything related to programming! | Programming Resources

CGI Programming Unleashed


CGI Programming Unleashed

by Eugene Eric Kim

C  O  N  T  E  N  T  S

Chapter 1  What CGI Programs Can and Can't Do

Chapter 2  The CGI Specification

Chapter 3  Crash Course in CGI

Chapter 4  Comparison of the Various CGI Programming Libraries

Chapter 5  Designing Your CGI Application

Chapter 6  Testing and Debugging

Chapter 7  Server-Side Includes (SSI) and Gateway

Chapter 8  Forms and How to Handle Them

Chapter 9  Security

Chapter 10  Databases

Chapter 11  Searching and CGI

Chapter 12  Imagemaps

Chapter 13  Proprietary Extensions to Servers

Chapter 14  WinCGI The Basics

Chapter 15  Windows CGI: Database Backending

Chapter 16  DOS CGI: The Basics

Chapter 17  Voting Booths

Chapter 18  Discussion Forums

Chapter 19  Chat Rooms

Chapter 20  Multi-User Games and CGI

Chapter 21  Tracking Users

Chapter 22  Simple Order Entry

Chapter 23  Shopping Carts

Chapter 24  Java and JavaScript Alternatives to CGI

Chapter 25  ISAPI

Chapter 26  NSAPI

Chapter 27  ActiveXControls

Chapter 28  ActiveX Scripting


appendix A  Web Resources

Copyright C 1996 by Publishing


All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. For information, address Publishing, 201 W. 103rd St., Indianapolis, IN 46290.

International Standard Book Number: 1-57521-151-3

HTML conversion by :
    M/s. LeafWriters (India) Pvt. Ltd.
    Website :
    e-mail :

All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.

President, Sams Publishing Richard K. Swadley
Publishing Team Leader Greg Wiegand
Managing Editor Cindy Morrow
Director of Marketing John Pierce
Assistant Marketing Managers Kristina Perry, Rachel Wolfe

Acquisitions Editor Christopher Denny Development Editors Anthony Amico, Keith, Davenport, Jeff Koch
Software Development Specialist Brad Meyers Production Editor Anne Owen
Copy Editors Brice Gosnell, Chuck Hutchinson, Kris Simmons IndexerJohn Hulse
Technical Reviewers Ian Anderson, Raj Mangal, Patrick McKeown, Christopher Stone, Matthew Stone Editorial Coordinator Katie Wise
Technical Edit Coordinator Lynette Quinn Resource Coordinator Deborah Frisby
Editorial Assistants Carol Ackerman, Andi Richter, Rhonda Tinch-Mize Cover Designer Tim Amrhein
Book Designer Gary AdairCopy Writer Peter Fuller
Production Team Supervisor Brad Chinn
ProductionStephen Adams, Debra Bolhuis, Mona Brown, Kevin Cliburn, Michael Dietsch, Jason Hand, Daniel Harris, Chris Livengood, Casey Price, Laura Robbins, Bobbi Satterfield, Becky Stutzman, Susan Van Ness

About the Authors

Daniel Berlin is a high-school senior at The Peddie School in New Jersey. He has worked as a programmer in local industry during summer vacations, and he has done technical editing and consulting in the past year. He expects to pursue a career in computer science and law. Dan is well known in the CompuServe community, where he has been a forum leader of various forums as well as an active contributor.

Richard Liam Dice is the vice president of Anadas Software and Internet Development, a Canadian company specializing in the production of high-end Web sites and CGI programming. He studied at the University of Western Ontario and has a B.Sc. degree in applied mathematics, concentrating on programming mathematical models of physical and astrophysical situations. His first exposure to the Internet was in 1990. He has been a regular user of the Internet and a UNIX programmer since 1992. Richard started using the Web in mid-1993 and has been programming CGI applications, usually using Perl 4, since early 1995.

António Miguel Ferreira is one of the founders and the Web expert of Esoterica S.A., an Internet service provider in Portugal. He graduated with a degree in computer science and engineering in INSA Lyon, France. He has developed financial-analysis software and currently manages several corporate Web sites for different kinds of clients, based on different hardware and software platforms. He has authored technical articles in some magazines. His other book is entitled Searching for Gold in the Internet. You may reach him at His home page is at

Shuman Ghosemajumder is the president of Anadas Software and Internet Development, a leading producer of high-end corporate Web sites and commercial CGI application software. Shuman began in the software industry as a developer of real-time workgroup applications on networked personal computers in the C language. He co-founded Anadas Software and Internet Development in 1995. It now serves clients all over the world. Anadas's head office is in London, Canada. Shuman holds a B.Sc. degree in computer science from the University of Western Ontario.

Ken Hunt is a vice president at Anadas Software and Internet Development. Ken brings to Anadas a wealth of experience in developing software for commercial and scientific applications on many different platforms. His projects have included human blood flow modeling, evolutionary population dynamics, and simulations of the behavior of black holes. An award-winning public speaker, Ken has spoken on the potential of emerging technologies to Fortune 100 companies and university groups in North America and Europe.

Bill Schongar can be found playing multimedia developer and all-purpose Internet guy at LCD Multimedia, in Nashua, NH, doing things like breaking-uh, improving-the systems, helping people find ways to waste their free time, and having fun. When not staring at a computer screen, he can be found in the woods of New Hampshire, being eaten by vicious bugs or trying not to get tagged by paintballs.

Randy Yarger ( pretends (when the friendly men in white coats let him) he is the systems administrator for H-Net, Humanities OnLine at Michigan State University. He can be reached at, but please, no sharp objects.

Tell Us What You Think!

As a reader, you are the most important critic and commentator of our books. We value your opinion and want to know what we're doing right, what we could do better, what areas you'd like to see us publish in, and any other words of wisdom you're willing to pass our way. You can help us make strong books that meet your needs and give you the computer guidance you require.

Do you have access to CompuServe or the World Wide Web? Then check out our CompuServe forum by typing GO SAMS at any prompt. If you prefer the World Wide Web, check out our site at

If you have a technical question about this book, call the technical support line at
(800) 571-5840, ext. 3668.

As the team leader of the group that created this book, I welcome your comments. You can fax, e-mail, or write me directly to let me know what you did or didn't like about this book-as well as what we can do to make our books stronger. Here's the information:

Mail:Greg Wiegand
Comments Department
Sams Publishing
201 W. 103rd Street
Indianapolis, IN 46290