Hi there,
I'm a newbie on the php front but I've altered an email script to send a
bunch of information from a HTML form to an email address. Can anyone see
where I have gone wrong?
I am getting the following error:
Parse error: parse error, unexpected T_STRING in
/home/httpd/vhosts/yourdomain.com/httpdocs/test3/lifecover.php on line 62
I have posted the script below, any help would be muchly appreciated
(apologies if it is the worst script ever written!).
<?
$type=$_POST['type'];
$SingleJoint=$_POST['SingleJoint'];
$CoverReq=$_POST['CoverReq'];
$name=$_POST['name'];
$day=$_POST['day'];
$mn=$_POST['mn'];
$yr=$_POST['yr'];
$gen=$_POST['gen'];
$smoker=$_POST['smoker'];
$name1=$_POST['name1'];
$day1=$_POST['day1'];
$mn1=$_POST['mn1'];
$yr1=$_POST['yr1'];
$gen1=$_POST['gen1'];
$smoker1=$_POST['smoker1'];
$years=$_POST['years'];
$pay=$_POST['pay'];
$quotation=$_POST['quotation'];
$cover=$_POST['cover'];
$waiver=$_POST['waiver'];
$phn=$_POST['phn'];
$time=$_POST['time'];
$email=$_POST['email'];
$to="ne**@yourdomain.com";
$from="$email";
$message=" Application Type : $type\n\n
Single or Joint : $SingleJoint\n\n
Cover Required : $CoverReq\n\n
Personal Details :\n\n
Name : $name\n\n
DOB : $day/$mn/$yr\n\n
Gender : $gen\n\n
Smoker : $smoker\n\n\n\n
Partner Details :\n\n
Name : $name1\n\n
DOB : $day1/$mn1/$yr1\n\n
Gender : $gen1\n\n
Smoker : $smoker1\n\n\n\n
Policy Information :\n\n
Terms of Policy : $years\n\n
Do you wish to pay : $pay\n\n
Quotation based on: $quotation\n\n
Cover to : $cover\n\n
Waiver of premium : $waiver\n\n\n\n
Contact Details :\n\n
Phone : $phn\n\n
Time to call : $dtime\n\n
Email Address : $email\n\n;
if (mail($to, "Customer Information", "$message\n", "From: $from"))
{$URL="http://www.yourdomain.com/test3/thankyou.htm";header ("Location:
$URL");
} else {
echo "There was a problem sending the mail. Please check that you filled in
the form correctly.";
}
?>
--
Regards,
Neil McDermott
01604 627593
07841 865970
www.easiserv.com
--
Regards,
Neil McDermott
01604 627593
07841 865970
www.easiserv.com