Visitor's form example

#!/usr/local/bin/perl -- -*- perl -*-
#
# visit.pl
# This script mails some information across to admin
# Written by Graeme Cross, 4/12/95 - v1.00
#

require 'cgi-lib.pl';
require 'ctime.pl';

$mail = '/bin/mail';
$user = 'graeme@chem2.chem.swin.edu.au';

# read in the information from the browser
&ReadParse;

chop($now = &ctime(time()));

# now mail the information to me
open(MAIL, "| $mail $user") || die "Error: Can't open mail program!\n";
print MAIL <<MAILOUT;
Mail from: $in{'email'}
       At: $now
   Sender: $in{'user'}
   Reply?: $in{'reply'}
 Comments: $in{'comments'}
MAILOUT
close(MAIL);

print &PrintHeader;

print <<OUTPUT;

<TITLE>Mail results</TITLE>

<H1 ALIGN=center>Mail results</H1>

Thanks <i>$in{'name'}</i>.<P>

Your comments have been mailed to <tt>$user</tt>.<P>

OUTPUT



Perl & Linux

Updated: 4 December, 1995