Advertisement
Guest User

Untitled

a guest
Oct 27th, 2015
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <?php
  2. if($_POST["nombre"] && $_POST["email"] != ""){
  3. $de = $_POST["nombre"];
  4. $destino = "joanpuigbertran@hotmail.com";
  5. $asunto = "missatge desde agency";
  6. $mensaje .= "MISSATGE: " . utf8_decode($_POST["missatge"]) ."\n";
  7. $mensaje .= "\n";
  8. $mensaje .= "NOM remitent: " . utf8_decode($_POST["nombre"]) ."\n";
  9. $mensaje .= "\n";
  10. $mensaje .= "EMAIL: " . utf8_decode($_POST["email"]) ."\n";
  11. $emailheader = "From: estudijoanpuig <joanpuigbertran@hotmail.com>\r\n";
  12. mail($destino, $asunto, $mensaje, $emailheader) or die ("No ha funcionat .<br/>Prova-ho novament.");
  13. echo utf8_decode(utf8_encode('Missatge enviat correctament.'));
  14. } else {
  15. if($_POST["nombre"] == ""){
  16. echo utf8_encode ('Por favor, indica tu nombre.');
  17. exit; }
  18. if($_POST["email"] == ""){
  19. echo utf8_encode ('Por favor, indica un email de contacto.');
  20. exit; }
  21. }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement