1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
| <?php
/* Subject and Email variables */
$emailSubject = 'Formulaire Contact';
$webMaster = 'contact@xxxxxx.com';
/* Gathering Data variables */
$societeField = $_POST['societe'];
$nomField = $_POST['nom'];
$adresseField = $_POST['adresse'];
$cpField = $_POST['cp'];
$villeField = $_POST['ville'];
$telephoneField = $_POST['telephone'];
$emailField = $_POST['email'];
$typField = $_POST['typ'];
$demandeField = $_POST['demande'];
$body = <<<EOD
<img src="banMM.jpg" width="637" height="114"/>
<hr>
- - - COORDONNEES DU CONTACT - - -<br><br>
Societe : $societe <br><br>
Fonction : $fonction <br><br>
Nom : $nom <br>
Adresse : $adresse <br>
CodePostal : $cp <br>
Ville : $ville <br>
Telephone : $telephone <br>
Email : <a href = $email > $email </a><br><br>
<hr>
- - - RENSEIGNEMENT DU CONTACT - - -<br><br>
Que veut-il : $typ <br><br>
Objet de la demande : $demande <br>
<hr>
EOD;
$headers ='From: "FORMULAIRE TSR"<formulaire@xxxx.com>'."\n";
/* $headers .='Reply-To: $email'."\n"; */
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>xxxxxx</title>
<link href="design.css" rel="stylesheet" type="text/css" media="screen"/>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="logo"></div>
</div>
<div id="content">
require ('menu.php');
require ('left_column.php');
<div id="rightColumn">
<h1>Contact ... </h1>
<h2>Merci d'avoir utilise le formulaire. Je vous repondrai dans les plus brefs delais. N'hesitez a me contacter sur mon telephone mobile.</h2>
</div>
</div>
require_once('footer.php');
</div>
</body>
</html>
EOD;
echo "$theResults";
?> |
Partager