The guestbook program allows you to create a form which visitors to your website can fill out, then displays the data entered by visitors on a page of your website. The data is handled by a program called a CGI script which runs on the Bruin OnLine web server.
Please Note: The guestbook is an advanced feature of the Bruin OnLine Web Service; familiarity with HTML tags is required. If you are unfamiliar with HTML, please consult out HTML reference page before attempting to create a guestbook.
In order to create a guestbook, you will need to create three separate files:
Your guest registration form should be a regular HTML form. This form may be a page in itself, or may appear as part of a larger page.
To instruct the reader's web browser to submit the form data to the guestbook script, begin your form with the tag:
<form method="post" action="/cgi-bin/send-form.cgi">
This tag signifies that the successive information will appear on your web page as a form, and that the data collected by the form will be posted to the Bruin OnLine guestbook service CGI script (/cgi-bin/send-form.cgi).
Next, create the text fields for your form. For each field you must specify a label, the variable to be entered, and the size of the field. To create a field for the visitor's e-mail address, for example, enter
<p>E-mail address: <input type="text" name="email" size="25" /></p>
E-mail address is the text label for the field, email is the variable to be entered, and 25 is the number of characters the field will hold. The field will appear on your form like this:
E-mail address:
After creating all the text fields for your form, create the SUBMIT and RESET buttons which will appear at the bottom of the form. To create the SUBMIT button, enter
<input type="submit" name="submit" value="POST to the guestbook">
type="submit" signifies the function of the button; POST to the Guestbook is the label which will appear on the button (you may enter different text here if you wish).
To create the RESET button, enter
<input type="reset" name="reset" value="CLEAR the form" />
At the end of your guest registration form place the tag
</form>
After creating the guest registration form, you must create a configuration file which will tell the CGI script the names of the variables you have included on the form and where to post the data collected, by the form.
The gbook.cfg file for a guest registration form with the variables name and email, for example, should look like this:
GuestFile=guestbook.html ViewHead=header.html ViewFoot=footer.html HitNo=1 EndConfig=Now $HITNO,No., ,<br> $DATE,Date:, ,<br> $TIME,Time:, ,<br> name,Name:, ,<br> homepage,Homepage:, ,<br> email,E-Mail Address:, ,<br>
Name the file gbook.cfg, and upload it to your public-html directory on the Bruin OnLine web server in ASCII format. Because the number of hits (HitNo) recorded in the gbook.cfg file is updated with each guestbook entry, once you have uploaded the file to the Bruin OnLine web server you must change the permissions so that everyone can read and write to the file. The gbook.cfg must be readable and writable by everyone so that the cgi script can change it after each entry is posted.
Note: UNIX (the operating system of the server on which the guest book script runs), unlike HTML, is case-sensitive; be sure that each command in the configuration file appears in the correct case. Take care not to enter any extra spaces or returns, as extra spaces and line breaks will appear as "garbage" text in your guestbook file.
The last file you must create is the HTML file in which the guestbook data is displayed. In this example this file is called guestbook.html; be sure that the name you select matches the name you entered next to GuestFile= in the configuration file.
Enter whatever other information (title, graphics, background, other text, etc.) you wish into the guestbook file, then insert the following tag just before the page's closing </body> tag:
</body>
<!--GuestBook Starting Point-->
Because the guestbook file is updated with each entry, once you have uploaded the file to the Bruin OnLine web server you must change the permissions so that everyone can read and write to the file.
FORM METHOD
TYPE
submit