4WWW95: tutorial:
an in-depth view of forms, tables and cgi


author:

alan richmond, CyberWeb SoftWare

overview:

this tutorial showed ways to enable users to respond to Web pages. alan presented tables, clickable imagemaps and HTML forms processed by cgi scripts.

tables:

this is a simple table:

rows / colscol 1col 2col 3col 4
row 111121314
row 221222324
row 331323334

various attributes allow to modify horizontal and vertical alignment, enable or disable borders and support fields that span multiple rows or columns.

important notice: please be aware that all tags and attributes that define tables are NOT part of the current HTML standard, these are just PROPOSED EXTENSIONS ! see also session about HTML V3.0.

ISMAP attribute:

if the ISMAP attribute is present in an IMG-tag and the image tag is within an anchor, the image will become a "clickable image". the pixel coordinates of the mouse pointer will be sent to the cgi script specified in the anchor in the form "URL?x.y" for further processing.

forms and cgi scripts:

forms add the dimension of interactivity to the Web. without forms, Web pages are "read-only". forms let the users write back to the author of the document, provide means to access databases and so on. a form is linked to a so called cgi script via the ACTION attribute in the FORM-tag.

forms my have text fields, text arrays, radio buttons, checkboxes, pull-down menus, scrolling lists etc. each field in a form has a NAME attribute. in addition, a form has a submit button. if a user submits a form, the information provided by the user is sent to the server for processing via a cgi script.

cgi stands for "Common Gateway Interface". while the form is platform independent, the actual cgi script depends on the operating system of the system where the HTTP daemon runs on. the cgi script can either be a shell script or a program written in any programming language supported by the operating system on the server. a very popular programming language to handle forms is PERL.

there are two methods to transfer the information from the client to the server: GET and POST.
information from a form using the GET method is appended to the end of the action URL. on a UNIX system, the information is stored in the environment variable QUERY_STRING.
if the POST method is requested, the data from the form field is transmitted immediately after the action URL. on a UNIX system, the data must be read from stdin. the number of bytes available on stdin is stored in the environment variable CONTENT_LENGTH (there is no "end of file" mark).


my comment:

alan provided useful information in his tutorial. however, for his tutorial, a title such as "introduction to forms, tables and cgi scripts" would have been more appropriate. he provided not more than an overview of these powerful features of HTML. he left most questions from the audience unanswered and some of his statements need further investigations ...
back to 4WWW95 main document.
4WWW95 tutorial E / 08-jan-96 (ra) / reto ambühler