Creating Background Scripts for HTML Pages

There are two distinct pieces of a Web Page Form.
  1. is the form itself created using html codes
  2. is the background process, a computer program, usually written in Perl or C
  3. These two pieces interact with each other thru CGI-The Common Gateway Interface
You read of CGI/PERL scripts because the separation between the two isn't very clear. Don't worry about CGI because if you use the examples of the given forms, the data will be correctly interpreted by the example scripts and the output will be correctly dealt with and info sent back to the user in the form of an HTML page.

Script Overview

To write your own scripts, you must create them or steal them from someplace and then put them in an executable directory on your server (usually /cgi-bin or some variant). Often, you will not be able to execute a script from your own directory on a public webserver. On our server, we generally create a user directory underneath cgi-bin for each user to fiddle around with. Once you've got your directory, copy in some scripts that work and see if they still work before you mess with them.

The main reason a script won't work initially is because it is not executable. In unix, you must do a "chmod 755 filename" to make a script read/execute for users and everything for you.

Scripts can be written in any programming language but Perl seems to be the most popular. Find out more about it at the Perl Home Page.

Scripts I've Done


| basic layout | formatting codes | links to elsewhere | pictures | view files | tables | forms
Mike Moxcey March 1998