
This simple Guestbook gadget will allow users to leave comments which get added to your web page. It also does some filtering of the input so that anonymous web surfers can't leave images, links, and general HTML in your guestbook.
This gadget expects to receive the input from a form with the fields NAME, FROM, and COMMENT. It also expects the document containing the form to have a line in it that STARTS with <!AFTER> or <!BEFORE>. The contents of the NAME, FROM and COMMENT fields will be inserted with a little HTML AFTER or BEFORE that line respectively. (This produces a list with the most recent entries first or last respectively.) (note: The variables, and the AFTER/BEFORE tag are case sensitive, in this case they need to be UPPER CASE.)
Note: A bug has been found that causes this script not to work when used in an index.html (or index.htm) file. To work around this bug, simply call the guestbook script from a page with a different name (e.g. guestbook.html).
Here is a very simple example:
<form action="/cgi-bin/guestbook">
Who are you: <input name="NAME" size=40>
Where are you from: <input name="FROM" size=40>
What would you like to say: <input name="COMMENT" size=40>
<input type=submit value="Leave your comments" size=40>
</form>
<!AFTER>