include ("admin/config.php");
$formulaire=(isset($_POST['formulaire']))? $_POST['formulaire'] : "";
$nom = (isset($_POST['nom']))? $_POST['nom'] : "";
$nom = htmlentities ($_POST['nom']);
$email = (isset($_POST['email']))? $_POST['email'] : "";
$tel = (isset($_POST['tel']))? $_POST['tel'] : "";
$tel = htmlentities ($_POST['tel']);
$pickupday = (isset($_POST['pickupday']))? $_POST['pickupday'] : "";
$pickupday = htmlentities ($_POST['pickupday']);
$pickuptime = (isset($_POST['pickuptime']))? $_POST['pickuptime'] : "";
$pickuptime = htmlentities ($_POST['pickuptime']);
$vehicule = (isset($_POST['vehicule']))? $_POST['vehicule'] : "";
$service = (isset($_POST['service']))? $_POST['service'] : "";
$pickuplocation = (isset($_POST['pickuplocation']))? $_POST['pickuplocation'] : "";
$pickuplocation = htmlentities ($_POST['pickuplocation']);
$destination = (isset($_POST['destination']))? $_POST['destination'] : "";
$destination = htmlentities ($_POST['destination']);
$instructions = (isset($_POST['instructions']))? $_POST['instructions'] : "";
$instructions = htmlentities ($_POST['instructions']);
$totalpassengers = (isset($_POST['totalpassengers']))? $_POST['totalpassengers'] : "";
$totalpassengers = htmlentities ($_POST['totalpassengers']);
$estimatehours = (isset($_POST['estimatehours']))? $_POST['estimatehours'] : "";
$estimatehours = htmlentities ($_POST['estimatehours']);
$retour = (isset($_POST['retour']))? $_POST['retour'] : "";
if (isset($_POST['formulaire']))
{
$echec="";
if($nom=="")
$echec=$echec."- The field name is required
";
if($email=="")
$echec=$echec."- The field email is required
";
elseif (!ereg("^(.+)@(.+)\\.(.+)$",$email))
$echec=$echec."- The field Email is incorrect
";
if($pickupday=="")
$echec=$echec."- The field Pick up day is required
";
if($pickuptime=="")
$echec=$echec."- The field Pick up time is required
";
if($pickuplocation=="")
$echec=$echec."- The field Pick up location is required
";
if($destination=="")
$echec=$echec."- The field Destination is required
";
if($totalpassengers=="")
$echec=$echec."- The field Total passengers is required
";
if($retour == 'retour souhaité'){
$retour="retour souhaité";
}else{
$retour="";
}
if($echec=="") {
$yes = "Your reservation has been sent. Thank you";
header("location: reservations_test.php?yes=$yes");
/* email de confirmation envoyé au client */
//$entetemail1= "From: webmaster@bcdlabel.com\r\n";
$entetemail1= "From: reservation@babandco.com\r\n";
$entetemail1 .= "Content-type: text/html; charset=iso-8859-1\r\n";
$msg1 = "
![]() | |
|
Dear $nom, Your reservation has been received. We'll answer straight away, if not, we'll get back to you as soon as possible. Thank you for your visit and see you soon. Regards, Will BAB&CO - Limousines services www.babandco.com\r\n | |
| if (isset ($error)) {echo "$error";} ?> {echo "$yes";} ?> |