Corresponding text
on pages 178-181.

So you've got a cool form and your server allows you to put up a CGI script especially for your form. You have a choice. Copy and paste a free CGI script that someone else has written or learn a language that can write CGI scripts. For most of us, this is a no brainer. We want to use CGI scripting only for our forms and even if we do multiple webpages, each will at most have one form. Most of us will choose to cut and paste existing scripts rather than learn a whole new language. However, you can do more than forms with CGI Scripting. So some people choose to learn a language that scripts in the CGI protocol. Scripting languages such as ColdFusion, ASP, and PHP are used to make a webpage interactive. The most popular language for this is called Perl, but recently ASP, with a big boost from giant Microsoft, is starting to gain favor. First, let's define CGI and Perl. You can then decide at what level you wish to get involved.

CGI stands for Common Gateway Interface. It is not a language, but something called a protocol. A protocol is a set of rules machines use for exchanging data. CGI is the standard way that browsers such as Netscape or IE communicate with a web hosting server. Therefore, any script written that needs to communicate with a browser must follow the CGI protocol. You can use almost any scripting language for web pages as long as it follows the rules of CGI protocol. The most commonly used scripting language is Perl.

Most of you will choose not to learn the Perl scripting language. The main focus of this section of our class is to introduce you to how the web works, in this case, interactive scripting. However, some of you may wish to explore Perl as an enrichment for the class. If you wish to be so enriched, the author of our text has written a similar book on Perl. You can order it at PeachPit Press. Like many things on the web, Perl(Practical Extraction and Report Language) was not originally intended for such use. It was created in 1986 by Larry Wall for the purpose of creating reports for the company he was working for. It has been since enriched and applied almost exclusively now to Web use. Perl is a great language for Web use because it works well on all platforms of servers. Currently, most web servers running Perl are Linux/Unix, however you can load versions of the Perl Interpreteron Windows NT, Macintosh, or even the free, open source Apache servers. And the Perl Interpreter is a free piece of software. So, the biggest stumbling blocks to using CGI/Perl scripting are: Does your webserver allow them?(most do), and learning the language. If you are interested in exploring Perl in greater detail, I recommend the above book. There is also a website devoted exclusively to Perl at www.perl.com.

Here is some sample Perl:
#!/usr/bin/perl
$dufous = "Rholl used to use Perl"; print dufous;

For those of you who are interested in "stealing" some Perl scripts to adapt and load on a server, try the following free sources:

ASP(Active Server Pages) have become more and more popular on Windows webservers since the turn of the century(2000). ASP is Microsoft's answer to the open source CGI protocol that was popular in the 90's. Generally ASP only runs on Windows servers however Windows servers are very common. The typical language for writing ASP is VBScript, Visual Basic Script. Here is some sample VBScript:

Response.Write vbTab &
& vbCrLf For Each Field in myRecordset.Fields
Response.Write vbTab & vbTab &
Response.Write strAltColor Response.Write & Field.Value & & vbCrLf
Next 'Field
Response.Write vbTab &
vbCrLf myRecordset.MoveNext Loop

Whether you use ASP or CGI usually depends on the type of webserver you use. ie Are you a Linux/Unix person or a Windows person. Most web hosting companies give you a choice of server types so if you get used to one dynamic server side scripting language you usually stick with it.

For those of you who are interested in "stealing" some ASP scripts to adapt and load on a server, try the following free sources:

Index Basic Tags Links Design Layout Tables Image File Types Using Images Image Editing Lists Frames