Kaye and Geoff's web page documentation
There are three guestbook files: a header, a body and a footer, named cgi_guestbook_head.html, cgi_guestbook_body.html and cgi_guestbook_foot.html. This approach separates out the unchanging parts of the HTML (header and footer) from the part which is updated. This makes editing the body easier since each new entry can just be appended rather than inserted.
The header starts with a HTTP directive required by the web server (a MIME type which tells it what sort of information is being provided) followed by a blank line (required) and then has the HTML to start the guestbook page. The HTML initiates a table for which the body is just a series of rows.
K and G's guestbook
The body is built by the CGI which writes the guestbook. Each one line entry is a row in a table. It often pays to set these files up with a 'dummy' entry (which you would do as part of the testing process anyway) before the real entries are made just in case there is some sort of operating system IO error when the file is empty. In the sample below the lines are broken in the centre purely for display reasons - so that hopefully the web page can be viewed without horizontal scrolling.
|Tue Jan 21 15:26:24 WAUST 1997||Mary Smith||Oz
||ecu||great pages! wish I had pages as good as this|
|Tue Jan 21 15:30:35 WAUST 1997||Bert Jones||NZ
||Auckland Uni||Mary put me onto your pages - good stuff|
|Tue Jan 21 15:31:34 WAUST 1997||Fred Nurke||USA
||Notre Dame||OK! Mary Smith and Bert Jones were right|
|Tue Jan 21 15:32:32 WAUST 1997||Bud Clarke||UK
||none||Mary is wrong. They are terrible pages!|
The footer just finishes off the HTML