User's Guide for FLS CGI Program /
Using the FLS CGI Program on your World Wide Web

David Bowen / Interdisciplinary Studies Program / Wayne State University / Detroit, MI 48202

[Return to Welcome Page]

NOTE: The links below this point are all internal to this document. If you are really linear and read all the way through this document from start to finish (not recommended), you will have seen the full contents and the links will not show you anything new.

CONTENTS:

General

On the World Wide Web, CGI programs provide interactivity; the ability to accept information from the user and respond. The user enters information on an HTML Form, and the CGI program responds. The FLS program has these interactive features:

Below, we will use the following terms to describe different roles on the World Wide Web:

This User's Guide has separate sections for the Web Author, the Web Site Administrator and the Web Programmer. We assume that you already know basic HTML, including HTML forms. A good source is HTML for Dummies by Ed Tittel and Steve James, published by IDG Books.

And a final word in this section, concerning computer platforms. A computer platform is a general type of computer, such as Macintosh, Unix or Windows. The four roles of user, author, administrator and programmer each have their own platform. The CGI program runs on the Web Server, not on the user or author computer. The user and author computers do not have to be compatible with the CGI program. The platforms can be:

[Return to Contents]

Web Author's Guide

The Web Author creates and maintains Web documents using Hypertext Markup Language (HTML) . This section of the guide explains how to incorporate FLS functions in your documents. We assume that you have a basic familiarity with HTML, including HTML forms. See, for example, HTML for Dummies by Ed Tittle and Steve James, published by IDG Books.

HTML forms get input from the user by means of the following elements:

Below, it is important to realize that elements for which multiple choices can be checked only send information for choices that are checked. For example, if a sequence of checkboxes have favorite-flavor choices for vanilla, chocolate, strawberry and cherry, and if the user checks vanilla and chocolate, then the values fields for vanilla and chocolate are returned, but not those for strawberry or cherry.

On the other hand, for elements where only a single choice can be checked or where text is typed into a window, information is returned for the sequence even if no choice is checked, or if no text is entered.

The actions that FLS takes are

FLS is started and your options are made in the HTML FORM statement. Below we present the general form of the FLS FORM statement. The variable parts of the statement are in italics, and explained below.

<FORM ACTION="/cgi-win/fls.exe/customfilename/mode/datafilename/fieldname/" METHOD="POST">

Customization file

The response to the user consists of three parts, two taken from a customization file written by the author (you), and the third generated by the FLS program, specified by the program Mode. The three parts appear on the user's screen in the following order:

  1. A "header" taken from the customization file.
  2. The response generated by the FLS program, depending on the Mode variable.
  3. A "footer" taken from the customization file.

The customization file is a regular HTML file that contains only the header and footer, along with special text dividing the file into the header and footer sections. The header and footer can contain any valid HTML, with the exception of HTML Form sections. The special text elements are "[start]", which starts the header; "[finish]", which ends the header and simultaneously starts the footer, and "[end]", which ends the footer. HTML before [start] and/or after [end] is ignored. The general form of the customization file is then:

     HTML before the header is ignored
     [start]
     The header is any HTML between start and finish
     [finish]
     The footer is any HTML between finish and end
     [end]
     HTML after the footer is ignored

EXAMPLE:

     [start]
     <H2>Thank you for responding.</H2>
     [finish]
     Thank you for trying our Web site.<P>
     Come back again.
     [end]

In the example, the header is (in H2 format)
Thank you for responding.

and the footer is
Thank you for trying our web site.
Come back again.

NOTE: If the [start], [finish] and/or [end] lines contain any other text, it is ignored. The user does not see any text on these lines. These lines may be used for comments for the Web author.

FLS Modes

The FLS Mode determines both the format for saving user input in a file, and the format for the response message. So before describing the Mode options, we first present the file format options, and the response message formats. The Modes are listed following the file and response message formats.

File format options

The information fields stored in the file all contain the same information; only the format is different, as described further on. The information stored is:

FLS saves user information in a file in one of the following formats:

Response message formats

The options for FLS response messages are listed below. Recall that the FLS response message has a header above and a footer below from the customization file created by the Web author.

Modes

The table below lists the FLS modes.

     Mode        File format       Response message
   * echoit      None              Echo
   * fileit      Standard          Acknowledgment
   * echofile    Standard          Echo
   * spread      Spreadsheet       Acknowledgment
   * echospread  Spreadsheet       Echo
   * summary     None              Summary
   * debug       None              Full  

[Return to Top]

Web Administrator's Guide

(Installing FLS.EXE on your Web site)

FLS.EXE runs with Web Severs using the Windows CGI convention as described by Robert Denny, and incorporated in the City Net Web Server (WHTTPD) for Windows 3.x and the O'Reilly Web Server (WebSite) for Windows 95 and Windows NT. Documentation with these Web Servers suggests that the same CGI program should not be able to run with both, but FLS will run with both. Different fields will be empty depending on which Server is used, but these fields are usually not of interest to users and Web authors.

FLS.EXE is designed to be used in system in which each directory on the Web Site is an independent entity. Specifically, each customization file should be in the same directory as its corresponding form file. Any data files are put in the same directory, or read from the same directory, in the case of the summary function.

To install FLS,

[Return to Top]

Web Programmer's Guide

FLS is written in Microsoft Visual Basic, version 3.0, and the routines can be incorporated in other CGI programs. This section describes the FLS routines.

Module: CGI.BAS

This is the CGI.BAS distributed with O'Reilly WebSite. We have modified the routine InitializeCGI so that it runs transparently with WHTTPD from CityNet.

Module: FLS.BAS

Module: SUBS.BAS

Module: UTILITY.BAS

[Return to Top]