DarkMan's Homepage - Perl section

This is my first perl program, a guestbook. It's simple and functional..
You can use it for free if you want to... have fun.


HTML files:
gbstart.html template file for guestbook (start)
gbend.html template file for guestbook (end)
gredirect.html redirector file sample (the file to show after the form submitted & guestbook created) the name must be gredirect.html to activate...
gbook.html html file where you can type name/comment/email/url
gbmask.html html file where you can define the look of the guestbook fields are defined as follows:
[$name$] gbook.html - input type="text" name="name"
[$gemail$] gbook.html -input type="text" name="gemail"
[$gurl$] gbook.html - input type="text" name="gurl"
[$comment$] gbook.html - input type="text" name="comment"
[$time$] time at the entry was written
[$date$] date at the entry was written

files (requires perl):

guest.pl dummy module (includes guest2.pl) because i wrote the script under Win and i started them on Linux (CR + LF problem)
guest2.pl guestbook function (look inside for more info) WARNING!! if you want use this with W95/98 you must comment the call flock(..) out
usecgidat script to prepare CGI data coming from web-server

OUTPUT
guestbook.html guestbook file... don't edit 'cause this is an output file (see above)
gbdata here are the data, typed in gbook.html

BUGS
there are problems if the text longer (without a space! for example: 200 chars without ENTER or SPACE)

TODO
you can't define new input fields without changing the code...
code need to be optimized
guestbook can't be recreated if the mask was changed (only if you insert a new comment)
guestbook has no limits (date or size/count) (unlimited entries are possible)

download gbook.zip (6 Kbyte)

honlap | Hauptseite | homepage














1