venimfrogtongue has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use CGI; use CGI::Carp 'fatalsToBrowser'; my $q = new CGI; print $q->header; &parsing; ########### Configure this section my $adminmail = "sulfericacid\@qwest.net"; my $subject = "enter subject here"; my $sendmail = "/usr/sbin/sendmail"; my %formdata; ########### End configurations. Unless you know what you are doing, d +o not edit below open (MAIL, $sendmail) or die "cannot open sendmail"; print MAIL "To: $adminmail\n"; print MAIL "From: admin\@everydayteens.net\n"; print MAIL "subject: $subject\n\n"; print MAIL "Name: $formdata{'name'}\n"; #### ERROR IS ON/NEAR THIS +LINE print MAIL "email: $formdata{'email'}\n"; print MAIL "message: $formdata{'message'}\n"; close(MAIL); sub parsing { my @fields = $q->param; foreach my $field (@fields){ $formdata{$field} = $q->param($field); } } print "Location: thanks.html" or die "cannot locate thanks.html";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Contact Form 2
by Juerd (Abbot) on Mar 25, 2002 at 08:26 UTC | |
|
Re: Contact Form 2
by cjf (Parson) on Mar 25, 2002 at 08:42 UTC | |
by Juerd (Abbot) on Mar 25, 2002 at 10:12 UTC | |
by particle (Vicar) on Mar 25, 2002 at 13:19 UTC | |
by venimfrogtongue (Novice) on Mar 26, 2002 at 01:15 UTC | |
|
Re: Contact Form 2
by webadept (Pilgrim) on Mar 25, 2002 at 08:20 UTC | |
by Juerd (Abbot) on Mar 25, 2002 at 08:33 UTC | |
|
Re: Contact Form 2
by erikharrison (Deacon) on Mar 25, 2002 at 18:41 UTC | |
|
Re: Contact Form 2
by talexb (Chancellor) on Mar 25, 2002 at 14:57 UTC |