daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. if(isset($_POST['action']))//le bouton envoyé du formulaire doit s'appeler action --> ex. <input type="submit" name="action" id="envoyer" value="" />
  3. {
  4. //Récupération des valeurs des champs de formulaire
  5. $prenom=$_POST['prenom'];
  6. $societe=$_POST['societe'];
  7. $email=$_POST['email'];
  8. $message=$_POST['message'];
  9.  
  10. //Compilation de l'email avant envoi
  11. $contenu="$prenom <br/>$tel  <br/>$message";
  12. $contenu=str_replace(chr(92),"",$contenu);
  13. $contenu=str_replace(chr(10),"<br/>",$contenu);//Touche entrée=retour chariot dans le champ Message
  14.  
  15. $headers="From: <$email>\n";
  16. $headers.="Content-Type: text/html; charset=UFT-8=\n";
  17.  
  18. $to="charbx.creation@gmail.com";
  19. $objet="inb4_form_workin_hard_lol";
  20.  
  21. //Envoi de l'e-mail (fonction 'mail' en PHP)
  22. mail($to, $objet, $contenu, $headers);
  23. }
  24. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top