NAME cgiform - stores client data from an HTML form on the server and returns
appropriate response messages. SYNOPSIS
<FORM METHOD='POST' ACTION='/cgi-bin/cgiform?<filename>[+[options]+[<subdirectory>]]'>
... </FORM>
where <filename> is a database name composed of any alphanumeric,
- (hyphen), or . (period) characters, where 'options' includes any order
of the characters [+acdmnpqrstuvw], and where <subdirectory> is
a valid path starting from the current host location (the location of
the request form). Brackets [] are used in this document to denote optional
values and are not used in the actual syntax. AVAILABILITY
http://www.eiu.edu • http://www.ux1.eiu.edu • http://www.research.eiu.edu
DESCRIPTION The script accepts a record of data from an HTML form on standard input,
stores the record in one of four formats in a UNIX text file, and then
displays either a generic or owner-supplied response page. Without any
options, each data record is stored by default as a raw (URL-encoded)
string of characters on a single line terminated by an end-of-line (<EOL>)
linefeed character. Submitted information will be placed in the same directory
(folder) as the HTML web page that displays the request form, unless a
modifying<subdirectory> is specified as an option. The script can
also control password-protected access to submit information. OPTIONS Any combination of options is prefixed by a single '+' and includes any
order of the following case-sensitive letters.
++ |
Display the current documentation and disable
all other actions of the script. |
+a |
Alias the owner of the database with '+m' or '+w'
options. The form must include either...
<INPUT TYPE='hidden' NAME='owner' VALUE='alias'>
or
<INPUT TYPE='hidden' NAME='owner' VALUE='alias@hostname'>
where 'owner' and 'alias' are valid account (login) names. The
'owner' refers to the account name where the form is located, whereas
the 'alias' is the destination of the e-mail message. A default
hostname of @eiu.edu will be appended to the alias unless another
hostname is specified. Any user-defined alias must be used in conjunction
with the '+m' or '+w' options. |
+c |
Control characters are removed from all NAME and
VALUE pairs; useful for importing the database into an spreadsheet
or database program where extraneous carriage returns would conflict
with the parsing of the data fields. |
+m |
Mail a message to the owner of the database when
the current user's record is saved to the database. A default hostname
of @eiu.edu will be assumed unless changed by the '+a' option. The
message will use a default subject of '<filename>.data @ '
followed by the address for the location of the database file (e.g.,
table.data @ http://www.eiu.edu/itsus/contact/survey/). To specify
a user-defined subject, the form should include the following (optional)
tag...
<INPUT TYPE='hidden' NAME='subject' VALUE='Your Subject...'>
where the NAME attribute is case-sensitive and the VALUE attribute
can have any of the following \ \-\.\/0-9\:\@A-Z_a-z characters
for the user-defined message. Any user-defined subject must be used
in conjunction with the '+m' (or '+w') option. |
+n |
Name of field prefixed to value as NAME=VALUE. |
+p |
Password protected access to the host location.
Information cannot be submitted without the client providing a username
and password for verification with those stored in '<filename>.passwd'.
To specify a username and password for access verification, the
form should include the following additional tags...
<INPUT TYPE='text' NAME='username'>
<INPUT TYPE='password' NAME='password'>
where the NAME attributes are case-sensitive. The access file
'<filename>.passwd' must be in the same directory as the HTML
request form that uses the access file. Usernames and their passwords
are delimited by a ':' character in the access file, as shown in
the following example for three different clients.
username1:password1
username2:password2
username3:password3
|
+q |
Quote-delimited format with comma separated fields,
e.g. "VALUE1","VALUE2"<EOL>. |
+r |
Row-delimited format with each field on a separate
line, e.g. VALUE1<EOL>VALUE2<EOL><EOL>. |
+s |
Substitute case-sensitive <!--META NAME-->
tags in '<filename>.html' with VALUE before displaying response
file. |
+t |
Tab-delimited format with each field separated by
a tab, e.g., VALUE1<TAB>VALUE2<EOL>. |
+u |
User information append as (USER= with '+n' option)
remote host(address) to database record. |
+v |
Verify (require) all field values to contain information
before saving record to database. This option will only work if
field names are actually passed by the browser. To ensure that all
or only specific fields contain information, the form should specify
which fields to check with the following (optional) tag...
<INPUT TYPE='hidden' NAME='verify' VALUE='NAME1 : NAME2 : NAME3'>
where both the NAME and VALUE attributes are case-sensitive and
where the VALUE attributes are the field names to require information.
Multiple field names in the VALUE attribute must be separated by
a : character as the delimiter. Any user-defined verification list
must be used in conjunction with the '+v' option. |
+w |
Warn the owner of the database via e-mail that a critical
error has occurred during use of the form. See the '+m' option for
more details about the e-mail message. |
USAGE The owner of the database has four basic formats to choose from: raw
(default), row-delimited, quote-delimited, and tab-delimited.
1. Raw (default) uses options [+[amsvw]] and stores data records in
the following format.
NAME1=VALUE1&NAME2=VALUE2&NAME3=VALUE3<EOL>
2. Row-delimited uses options [+r[acdmnsuvw]] and stores data records
with the '+n' option in the following format.
NAME1=VALUE1<EOL>
NAME2=VALUE2<EOL>
NAME3=VALUE3<EOL>
<EOL>
3. Quote-delimited uses options [+q[acdmnsuvw]] and stores data records
with the '+n' option in the following format.
"NAME1=VALUE1","NAME2=VALUE2","NAME3=VALUE3"<EOL>
4. Tab-delimited uses options [+t[acdmnsuvw]] and stores data records
with the '+n' option in the following format.
NAME1=VALUE1<TAB>NAME2=VALUE2<TAB>NAME3=VALUE3<EOL>
Additional working examples of these features and more are listed in
the SEE ALSO section of this documentation. FILES A database file will be created with a name of '<filename>.data'
in the same directory as the HTML page that presents the form. To store
the file in an existing subdirectory from the current host location, specify
the <subdirectory> option in the ACTION part of the form. Any specified
<subdirectory> option will always begin without a slash (/) and
will always end with a slash (/). To display a custom response page, place
a '<filename>.html' in the same directory as the HTML page that
presents the form. In both cases, <filename> is the same filename
used in the ACTION part of the form. SEE ALSO
CGI Suite (Collection of General Purpose Scripts)
Accounts @ Virtual Course
Environment
Contact Us @ Virtual Course
Environment
DIAGNOSTICS cgiform was developed to handle all types of user-, owner-, and server-related
errors. The script will send back to the client various well-behaved error
messages that will diagnose problems in creating the application form.
WARNINGS Permissions (600) to the '<filename>.data' database file and the
'<filename>.passwd' are only read/write accessible by the owner
of the account. NOTES cgiform has been tested without problem on Windows NT Workstations with
Netscape Communicator 4.x and Microsoft Internet Explorer 3.x web browsers.
Older versions of these and other browsers that do not support JavaScript
and Cascading Style Sheets will not display the response messages and
documentation as fully designed. This browser limitation, however, has
no effect on the function of the script. BUGS There are no known bugs in the current version. AUTHOR Gerald Charles Wagner. Version 3.0 (Release September 1999). |