Rookie
02-21-2003, 09:49 PM
I have set my action correctly from my .htm document.
My server allows .cgi to run outside cgi-bin directory.
However, I am receiving an error when processing the form. I have reviewed the script continuously and can not reach a solution.
Here is the script.
#!/usr/bin/perl
require "readPostInput.cgi";
%postInputs = readPostInput();
$dateCommand = "date";
$time = `$dateCommand`;
open (MAIL, "|/usr/sbin/sendmail -t") || return 0;
select (MAIL);
print<<"EOF";
To: kep1974@aol.com
From: $postInputs{ 'email'}
Subject: Email Registration Received
$time
Email Registration
Name: $postInputs{ 'Name'}
Email: $postInputs{ 'Email'}
Company Name: $postInputs{ 'Company'}
EOF
close(MAIL);
select (STDOUT);
printThankYou();
sub printThankYou(){
print<<"EOF";
Content-Type: text/html
<HEAD>
<TITLE>THANK YOU FOR REGISTERING!</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="document">
</HEAD>
<BODY>
<TABLE CELLSPACING=2 CELLPADDING=2 BORDER=0 WIDTH=600>
<TR>
<BR>
<FONT SIZE=+2>Thank You</font></center><BR><BR>
<B><FONT SIZE=+2>
<P>Thank You $postInputs{ 'Name'} for registering <BR>
</FONT></B>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
EOF
}
My server allows .cgi to run outside cgi-bin directory.
However, I am receiving an error when processing the form. I have reviewed the script continuously and can not reach a solution.
Here is the script.
#!/usr/bin/perl
require "readPostInput.cgi";
%postInputs = readPostInput();
$dateCommand = "date";
$time = `$dateCommand`;
open (MAIL, "|/usr/sbin/sendmail -t") || return 0;
select (MAIL);
print<<"EOF";
To: kep1974@aol.com
From: $postInputs{ 'email'}
Subject: Email Registration Received
$time
Email Registration
Name: $postInputs{ 'Name'}
Email: $postInputs{ 'Email'}
Company Name: $postInputs{ 'Company'}
EOF
close(MAIL);
select (STDOUT);
printThankYou();
sub printThankYou(){
print<<"EOF";
Content-Type: text/html
<HEAD>
<TITLE>THANK YOU FOR REGISTERING!</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="document">
</HEAD>
<BODY>
<TABLE CELLSPACING=2 CELLPADDING=2 BORDER=0 WIDTH=600>
<TR>
<BR>
<FONT SIZE=+2>Thank You</font></center><BR><BR>
<B><FONT SIZE=+2>
<P>Thank You $postInputs{ 'Name'} for registering <BR>
</FONT></B>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
EOF
}