Web Teacher Software
web database
CGI tutorial
database consulting
web database training
contact us about web 
database software
Hosted Database Solutions
webteacher home
Web Teacher Consulting
CGI - A free tutorial for the Total Non-Programmer.
CGI - Let's get startedCGI - Introduction to Perl

The Guestbook CGI code

#********* BEGIN BODY********************

open (LOGFILE, ">>guestbook.log");


print LOGFILE ("$newline\n");
close LOGFILE;

print "<BODY BGCOLOR=\'BEIGE\'><H1>Thank you.  Your comments have been added</H1>";

#******** END BODY************************

This is the body of the guestbook.cgi program.  Once again, you should:

  • copy the code above into the BODY section of your template.txt file.
  • Save it as guestbook.cgi.
  • Upload guestbook.cgi to the perltour folder on your server,
  • Type chmod a+rx guestbook.cgi from the command prompt

You should now be able to test the form.  If it works, you will get a beige page thank you for your comments.
You can see if they have been added to the guestbook.log file by going to a Unix command prompt and typing
cat guestbook.log

BACKBreak it down

Home | WebData - Web Database Software | Javascript | CGI | Consulting | Map Builder | Contact Us | The Press Room