The Guestbook CGI code
#********* BEGIN
BODY********************
open (LOGFILE, ">>guestbook.log");
$newline=join('::',@value);
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
Break it down