A Guestbook

This example allows you to write a customizable guestbook for a Web site. A guestbook is an HTML form in which the user indicates his or her name and some comments. The guestbook can be used for collecting feedback on a topic, as a simple message board, or for submitting problems to a help desk. The data is kept in a file and can be displayed after the form is filled out; it also can be displayed on a page of its own.

Listing 18.7 provides a short bit of HTML to present a guestbook form for a fictional help desk. You can modify the form to suit your own needs, of course.

Listing 18.7 Help Desk Form
 1: <FORM action="/cgi-bin/helpdesk.cgi" name="helpdesk"> 2: Problem type: 3: <INPUT TYPE=radio name=probtype value=hardware>Hardware ...

Get Sams Teach Yourself Perl in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.