I am trying to create a feedback form for my visitors and have created the html page with the correct fields and field names and the form is posted to a file called form.pl
This is the code I have in form.pl...
#!/usr/bin/perl
use CGI;
$cgi = new CGI;
$admin = "paul\@audio-grabber.com";
$mailprog = "/usr/sbin/perl";
$name = $cgi->param("requiredName");
$age = $cgi->param("requiredAge");
$email = $cgi->param("requiredEmail");
$country = $cgi->param("requiredCountry");
$comments = $cgi->param("requiredComments");
print $cgi->header."
<b><i>Message Sent!</i></b><BR>
<BR><small>You supplied the following information:
<table><TR><TD><small>Name:</td> <TD><small>$name</td></tr>
<TR><TD><small>Age:</td> <TD><small>$age</td></tr>
<TR><TD><small>Email:</td> <TD><small>$email</td></tr>
<TR><TD><small>Country:</td> <TD><small>$country</td></tr>
<TR><TD><small>Comments:</td> <TD><small>$comments</td></tr></table>
<p>A reply will be given asap if necessary!</small>
";
sub send_mail {
open(MAIL,"|$mailprog -t");
print MAIL "To: $admin\n";
print MAIL "From: $email\n";
print MAIL "Subject: Audio-Grabber Feedback\n\n" }
print MAIL "Below is the result of your feedback form. It was submitted by $name\n";
print MAIL "Results are below:\n";
print MAIL "$name\n";
print MAIL "$age\n";
print MAIL "$email\n";
print MAIL "$country\n";
print MAIL "$comments\n";
Wherever I seem to call &send_email; I get an internal server error. How do I send the actual email?
What am I doing wrong?
Do I need the backslash here too?
$admin = "paul\@audio-grabber.com";
Thanks!
Paul Wilson.
(Dont blame me if I'm wrong!)
This is the code I have in form.pl...
#!/usr/bin/perl
use CGI;
$cgi = new CGI;
$admin = "paul\@audio-grabber.com";
$mailprog = "/usr/sbin/perl";
$name = $cgi->param("requiredName");
$age = $cgi->param("requiredAge");
$email = $cgi->param("requiredEmail");
$country = $cgi->param("requiredCountry");
$comments = $cgi->param("requiredComments");
print $cgi->header."
<b><i>Message Sent!</i></b><BR>
<BR><small>You supplied the following information:
<table><TR><TD><small>Name:</td> <TD><small>$name</td></tr>
<TR><TD><small>Age:</td> <TD><small>$age</td></tr>
<TR><TD><small>Email:</td> <TD><small>$email</td></tr>
<TR><TD><small>Country:</td> <TD><small>$country</td></tr>
<TR><TD><small>Comments:</td> <TD><small>$comments</td></tr></table>
<p>A reply will be given asap if necessary!</small>
";
sub send_mail {
open(MAIL,"|$mailprog -t");
print MAIL "To: $admin\n";
print MAIL "From: $email\n";
print MAIL "Subject: Audio-Grabber Feedback\n\n" }
print MAIL "Below is the result of your feedback form. It was submitted by $name\n";
print MAIL "Results are below:\n";
print MAIL "$name\n";
print MAIL "$age\n";
print MAIL "$email\n";
print MAIL "$country\n";
print MAIL "$comments\n";
Wherever I seem to call &send_email; I get an internal server error. How do I send the actual email?
What am I doing wrong?
Do I need the backslash here too?
$admin = "paul\@audio-grabber.com";
Thanks!
Paul Wilson.
(Dont blame me if I'm wrong!)