woody
March 16th, 2001, 12:01
Hi I'm a newbie at this, so please excuse..
Could you tell me if there is any way of changing the background colour of the page the user is sent to after filling out a 'mail to' form (perl) see below.
In other words what text do I need to insert in the script itself ?!
Also how I can receive info from any other text fields in my form? (not just the message parameter).
Here follows the script I'm using at present..
# This script:
#
# - Takes the form contents
# - Saves the message into a temporary file
# - Calls Blat to send the mail
#
# Use the cgi unit
use cgi;
# Get the values from the form
$form = new CGI;
$sname=$form->param('sendername');
$saddr=$form->param('senderaddr');
$rname=$form->param('recipientname');
$raddr=$form->param('recipientaddr');
$subject=$form->param('subject');
$server="smtp.fasthosts.co.uk";
$message=$form->param('message');
$lt='<';
$gt='>';
# Output the correct header
print "Content-type: text/html\n\n";
# Save the message into a text file
open (messtxt,">message.txt");
print messtxt ($message);
close messtxt;
# Build the Blat command line and execute it
$blat="blat.exe message.txt -s \"$subject\" -t \"$lt$raddr$gt$rname\" -server $server -f \"$lt$saddr$gt$sname\"";
system($blat);
print "<br><br>Thanks for filling out this form, your message has been sent. Please click the link below to return.<br><br>";
print ("© <a href=\"http://perso.wanadoo.es/woody/\">Island Bar</a>\n");
Could you tell me if there is any way of changing the background colour of the page the user is sent to after filling out a 'mail to' form (perl) see below.
In other words what text do I need to insert in the script itself ?!
Also how I can receive info from any other text fields in my form? (not just the message parameter).
Here follows the script I'm using at present..
# This script:
#
# - Takes the form contents
# - Saves the message into a temporary file
# - Calls Blat to send the mail
#
# Use the cgi unit
use cgi;
# Get the values from the form
$form = new CGI;
$sname=$form->param('sendername');
$saddr=$form->param('senderaddr');
$rname=$form->param('recipientname');
$raddr=$form->param('recipientaddr');
$subject=$form->param('subject');
$server="smtp.fasthosts.co.uk";
$message=$form->param('message');
$lt='<';
$gt='>';
# Output the correct header
print "Content-type: text/html\n\n";
# Save the message into a text file
open (messtxt,">message.txt");
print messtxt ($message);
close messtxt;
# Build the Blat command line and execute it
$blat="blat.exe message.txt -s \"$subject\" -t \"$lt$raddr$gt$rname\" -server $server -f \"$lt$saddr$gt$sname\"";
system($blat);
print "<br><br>Thanks for filling out this form, your message has been sent. Please click the link below to return.<br><br>";
print ("© <a href=\"http://perso.wanadoo.es/woody/\">Island Bar</a>\n");