Search the Catalog
CGI Programming on the World Wide Web

CGI Programming on the World Wide Web

By Shishir Gundavaram
1st Edition March 1996

This book is out of print, but it has been made available online through the O'Reilly Open Books Project.

Previous Chapter 2 Next

2. Input to the Common Gateway Interface

Using Environment Variables
Accessing Form Input
Extra Path Information
Other Languages Under UNIX
Other Languages Under Microsoft Windows
Other Languages on Macintosh Servers
Examining Environment Variables

2.1 Introduction

When a CGI program is called, the information that is made available to it can be roughly broken into three groups:

Most information about the client, server, or user is placed in CGI environment variables. Form data is either incorporated into an environment variable, or is included in the "body" of the request. And extra path information is placed in environment variables.

See a trend here? Obviously, CGI environment variables are crucial to accessing input to a CGI program. In this chapter, we will first look at a number of simple CGI programs under UNIX that display and manipulate input. We will show some examples that use environment variables to perform some useful functions, followed by examples that show how to process HTML form input. Then we will focus our attention on processing this information on different platforms.

Previous Home Next
Overview of the Book Book Index Using Environment Variables

Back to: CGI Programming on the World Wide Web Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies | Privacy Policy

© 2001, O'Reilly & Associates, Inc.