#!usr/bin/perl #Start the CGI! use CGI; #Declare a new page for the information my $Page = new CGI; #Put the data from the form into variables my $Name = $Page->param(Name); my $E_mail = $Page->param(E-mail); my $Comment = $Page->param(Comment); #A little bit of environment variables my $Browser = $ENV{"HTTP_USER_AGENT"}; #Open the file where the information will go. open(GUEST, '>>../GuestBook/GuestBook.txt') or die "The file could not be opened."; #Open up the file for the counter to... "count" the people open(COUNT, '../Counter/counter.txt') or die "The File could not be opened."; #Save the contents to a variable $Number = ; print COUNT $Number++; #Close it up close(COUNT); #Print all of the information, with the proper #HTML, to the file. print GUEST <

Otaku \#$Number.

Name: $Name

E-mail: $E_mail

Comment: $Comment

Your Browser type: $Browser

GuestStuff #Print the HTML MIME header from CGI. print $Page->header; #Print to the screen print < Thank you!

Thank you for your input! It will be on the GuestBook page, if you want to see it. You will now be redirected to the main page.

If it doesn't work in 10 seconds, here's the link.

HYPERSTUFF #close the GuestBook file close(GUEST);