Advertisement
Guest User

Untitled

a guest
Oct 10th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title></title>
  5. </head>
  6. <body>
  7. <h5>Pola wymagane zaznaczone są <a>*</a></h5>
  8. <form method="POST" name="myForm" id="myForm" action="#">
  9. <fieldset>
  10. <legend>mejl</legend>
  11. //
  12. <label for="adres">tytul <a>*</a></label>
  13. <input type="text" id="tytul" title="Wpisz tytul" name="tytul" required="required" />
  14. <br />
  15. <label for="tresc" >tresc <a>*</a></label>
  16. <input type="text" id="tresc" name="tresc" required="required" />
  17. <br />
  18. </fieldset>
  19.  
  20. <br />
  21. <input id="Button1" type="submit" name="Button1" value="Wyślij" />
  22. <input id="Reset1" type="reset" value="reset" />
  23. <br />
  24. </form>
  25. <?php
  26.  
  27. //mail($adres, $tytul, $wiadomosc);
  28. //$od = "From: katarzyna.rzonca@hotmail.com \r\n";
  29. //$od .= 'MIME-Version: 1.0'."\r\n";
  30. //$od .= 'Content-type: text/html; charset=iso-8859-2'."\r\n";
  31. $headers = 'From: katarzyna.rzonca@hotmail.com ' ."\r\n".
  32. 'Reply-To: katarzyna.rzonca@hotmail.com ' . "\r\n".
  33. 'Content-type: text/html; charset=utf-8' ."\r\n";
  34.  
  35. if ( isset( $_POST['Button1']) )
  36. {
  37. $adres = 'tutajmejl@gdzie.ma.wysylac chyba';
  38. $tytul = $_POST['tytul'];
  39. $wiadomosc = $_POST['tresc'];
  40. if(empty($adres) || empty($tytul)|| empty($wiadomosc))
  41. {
  42. echo "proszę wypełnic pola";
  43. }
  44. else
  45. {
  46. mail($adres, $tytul, $wiadomosc,$od);
  47. $ins = mail($adres, $tytul, $wiadomosc,$od);
  48. if($ins) echo "wyslano";
  49. else echo "nie wyslano";
  50. }
  51. }
  52.  
  53. ?>
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement