Guest User

Untitled

a guest
Feb 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <form class="callback__form" action="send.php" method="post">
  2. <input type="text" name="urname" placeholder="Ваше имя.." required>
  3. <input type="text" name="urtel" placeholder="Ваш телефон.." required>
  4. <input type="submit" id="send-post" value="Вызвать мастера">
  5. </form>
  6.  
  7. <?php
  8. $urname = $_POST['urname'];
  9. $urtel = $_POST['urtel'];
  10. $urname = htmlspecialchars($urname);
  11. $urtel = htmlspecialchars($urtel);
  12. $urname = urldecode($urname);
  13. $urtel = urldecode($urtel);
  14.  
  15. mail("test@gmail.com", "Заявка", "Имя:".$urname.". Телефон: ".$urtel ,"From: test2@gmail.com rn");
  16. if (mail("test@gmail.com", "Заявка", "Имя:".$urname.". Телефон: ".$urtel ,"From: test2@gmail.com rn"))
  17.  
  18. if ($mail == 1) {
  19. header("Location: /thanks.html");
  20. }
  21. ?>
Add Comment
Please, Sign In to add comment