[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SLUG] Mailform.cgi again.. last bit required.
Hi all,
I managed to get most of what I want done in shell scripting (I know I know)
and the body of it in perl but the original perl script at the bottom opens
a URL depending on the outcome of the whole perl script. If it worked, it
opens a $URL and if it fialed then it opens the normal HHTP error.
I run my shell script which returns the name of the URL to load up but I
always get a Internal Server Error.. What's wrong with passing the $script
to the Location? I run it from the command line using "perl mailform.cgi
blahblah=test1 blah2=test2" and I get an echo of
Location: authok.html
Here's my original code and lower is the modified code... Can anybody help?
# --- modified ----
# Run a shell script and return the URL results
$script=`/home/httpd/cgi-bin/registeremail $in{mailformFromEmail}
$in{mailformFromName} $in{mailformOption}`;
if( "$script" ne "" ) {
print("Location: $script\n\n");
}else {
print("Location: $ENV{HTTP_REFERER}\n\n");
}
exit(1);
# --- Original ----
if( "$in{mailformURL}" ne "" ) {
print("Location: $in{mailformURL}\n\n");
}else {
print("Location: $ENV{HTTP_REFERER}\n\n");
}
exit(1);
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text