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
|
<?php
$prenom = $_POST['prenom'];
$nom = $_POST['nom'];
$email = $_POST['email'];
$adresse = $_POST['adresse'];
$codepostal = $_POST['codepostal'];
$ville = $_POST['ville'];
$pays = $_POST['pays'];
$gsm = $_POST['gsm'];
$sujet = $_POST['sujet'];
$commentaire = $_POST['commentaire'];
$messageToSend .= "\n";
$messageToSend .= "Nom : ".$nom."\n";
$messageToSend .= "Prénom : ".$prenom."\n";
$messageToSend .= "Email : ".$email."\n";
$messageToSend .= "Adresse : ".$adresse."\n";
$messageToSend .= "Code postal : ".$codepostal."\n";
$messageToSend .= "Ville : ".$ville."\n";
$messageToSend .= "Pays : ".$pays."\n";
$messageToSend .= "Téléphone : ".$gsm."\n";
$messageToSend .= "Sujet : ".$sujet."\n\n";
$messageToSend .= "Commentaire : ".$commentaire."\n";
// envoyer message
$to = "ma083028@skynet.be";
$subject = "Formulaire de contact";
$from = "From: $email\n";
mail($to, $subject, $messageToSend, $from);
?> |
Partager