Dingbat
08-28-2009, 07:45 PM
Hi Guys,
I have a problems trying to configure a mail script. I have a form with four fields: name="email", name="First", name="Datefrom". name="Dateto".
The mail sending script is as follows:
[CODE]<?php
$email = $_POST["email"];
$myname = "Lewis Villa Menorca";
$mymail = "";
$subject = "Reservation Confirmation";
$body = "Dear $_POST["First"]. This is to confirm your reservation
at the Lewis Villa in Menorca for the following dates:
Notice how I can continue typing right on the next line!";
$headers = "Content-Type: text/plain; charset=us-ascii\nFrom: $myname <$mymail>\nReply-To: <$mymail>\nReturn-Path: <$mymail>\nX-Mailer: PHP";
if ($email != "") { mail($email,$subject,$body,$headers); }
?>[CODE]
Within the code I have included in the $body the $Post_First. This produces an error.
My question is: How do I insert code to use the First, Datefrom and Dateto fields from the form?
The Dingbat :o
I have a problems trying to configure a mail script. I have a form with four fields: name="email", name="First", name="Datefrom". name="Dateto".
The mail sending script is as follows:
[CODE]<?php
$email = $_POST["email"];
$myname = "Lewis Villa Menorca";
$mymail = "";
$subject = "Reservation Confirmation";
$body = "Dear $_POST["First"]. This is to confirm your reservation
at the Lewis Villa in Menorca for the following dates:
Notice how I can continue typing right on the next line!";
$headers = "Content-Type: text/plain; charset=us-ascii\nFrom: $myname <$mymail>\nReply-To: <$mymail>\nReturn-Path: <$mymail>\nX-Mailer: PHP";
if ($email != "") { mail($email,$subject,$body,$headers); }
?>[CODE]
Within the code I have included in the $body the $Post_First. This produces an error.
My question is: How do I insert code to use the First, Datefrom and Dateto fields from the form?
The Dingbat :o