CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
guestbook

 



raven
Deleted

Nov 27, 2000, 9:45 AM

Post #1 of 1 (369 views)
guestbook Can't Post

I am trying to get this very simple guest book to work, but every time I try I recieve a internal server error or misconfiguration mesage. I have checked all the permissions and paths, I just can not figure out the problem, a copy of the cgi script is bellow. any help would be great.
Thanx Raven
#!/usr/bin/perl

use CGI;

$co = new CGI;

open (BOOK, ">>book.htm") or die "Could not open guestbook" ;

seek (BOOK, -length($co->end_html), 2);

$date = `date`;

chop($date);

$username = $co->param('username');

$username =~ s/</</;

$text = $co->param('comments');

$text =~ s/</</;

print BOOK

$co->h3
(
"New comments by ", $username, " on ", $date,
$co->p,
$text,
),

$co->hr,

$co->end_html;

close BOOK;

print $co->header,

$co->start_html(
-title=>'Guest Book Example',
-author=>'Steve',
-BGCOLOR=>'white',
-LINK=>'red'
);

print

$co->center($co->h1('Thanks for adding to the guest book!')),

"If you want to take a look at the guest book, ",

$co->a(
{href=>"http://www.goldsgymokc.com/cgi-bin/book.htm"},
"click here"
),".",

$co->hr,

$co->end_html;

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives