woody
March 19th, 2001, 20:33
Maybe this is a stupid question, but I am new at this..
When I receive the info in my inbox from a form, all of the fields get printed out in one sentence (same line) how do I separate the fields in my received message? I know I've got to use <br> tags (I think) but where?!
Here's my code for the script..
# 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('email');
$raddr=$form->param('recipientaddr');
$subject=$form->param('subject');
$refco=$form->param('refcode');
$server="smtp.fasthosts.co.uk";
$message=$form->param('message');
$sname=$form->param('sendername');
$saddr=$form->param('senderaddr');
$subject=$form->param('subject');
$refco=$form->param('refcode');
$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);
print messtxt ($refco);
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 $blat;
print "<br><br>Thanks for filling out this form.<br><br><BODY BGCOLOR=#FFFFCC>";
print "Mail sent to $raddr.";
Hope someone can help ;-)
woody
When I receive the info in my inbox from a form, all of the fields get printed out in one sentence (same line) how do I separate the fields in my received message? I know I've got to use <br> tags (I think) but where?!
Here's my code for the script..
# 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('email');
$raddr=$form->param('recipientaddr');
$subject=$form->param('subject');
$refco=$form->param('refcode');
$server="smtp.fasthosts.co.uk";
$message=$form->param('message');
$sname=$form->param('sendername');
$saddr=$form->param('senderaddr');
$subject=$form->param('subject');
$refco=$form->param('refcode');
$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);
print messtxt ($refco);
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 $blat;
print "<br><br>Thanks for filling out this form.<br><br><BODY BGCOLOR=#FFFFCC>";
print "Mail sent to $raddr.";
Hope someone can help ;-)
woody