rainman89
I cant find the any key..
- Local time
- Today, 04:07
- Joined
- Feb 12, 2007
- Messages
- 3,015
Hi all,
Trying to launch a webform but im getting this error on submit
Below is the script i am trying to run.... im at my wits end trying to figure this one out! any help is appreciated.
Trying to launch a webform but im getting this error on submit
Ive looked everywhere to try to find an example.. its on an NT server which i was told doesnt need to have permissions modified(was i lied too???)The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
The system cannot find the path specified.
The system cannot find the path specified.
Below is the script i am trying to run.... im at my wits end trying to figure this one out! any help is appreciated.
Code:
#!/usr/bin/perl
# Stuff circa 1998-99 rmo
use 5.004;
use CGI qw(:standard);
use vars qw($query @lines);
use subs qw(&extract_form_data &bail);
$query = new CGI();
@lines = ();
@lines = &extract_form_data();
my $COMMAND = '/usr/lib/sendmail -oi -t -f';
my $Email = $query->param('Email') ||
&bail('ERROR',"No/invalid recipient specified");
my $opr = 'me@myplace.com';
my $subject= "Request from website";
open(MAIL,"|$COMMAND $Email" . ' > /dev/null 2>&1');
print MAIL "Subject: $subject\n";
print MAIL @lines;
close (MAIL);
open(MAIL,"|$COMMAND $opr" . ' > /dev/null 2>&1');
print MAIL "Subject: $subject\n";
print MAIL @lines;
close (MAIL);
sub extract_form_data
{
# my @lines = ();
foreach my $name($query->param) {
push @lines, $name. " = " .
$query->param($name);
}
return (join "\n", @lines). "\n";
}
sub bail
{
my $title = shift;
my $error = "@_";
my $result = header(-type => 'text/html');
$result .= start_html(-TITLE => $title, -bgcolor => '#ffffff',
-text => '#000000', -vlink => '#006600',
-link => '#006600', );
$result .= b($error);
$result .=<<EOS;
</p><p>
<center>
THANK YOU<br>
A confirmation Email has been sent to you at:
$Email<br>
</center>
<a href="javascript:history.go(-1); return false;"
onMouseOver="window.status='Go back to update form'; return true;"
onClick="javascript:history.go(-1); return false;"
>Go Back</a>
</p>
EOS
$result .= end_html;
$result .= "\n";
print $result;
exit 0;
}