Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Formularz zgłoszeniowy, nie przesyła/pobiera danych
kafar610
post
Post #1





Grupa: Zarejestrowani
Postów: 51
Pomógł: 0
Dołączył: 13.01.2013
Skąd: Pruszków

Ostrzeżenie: (0%)
-----


Witam
Mam problem z moim małym skrypcikiem bo nie pobiera mi niektorych danych, bierze tylko numer telefonu i email, i nie wiem czemu.
Prosze o wyrozumiałość gdyż jestem świeżakiem (IMG:style_emoticons/default/biggrin.gif)
  1. <?php
  2.  
  3. $email_to = "kafar610@gmail.com";
  4. $email_subject = "Your email subject line";
  5.  
  6. $first_name = $_POST['firstname'];
  7. $last_name = $_POST['lastname'];
  8. $email = $_POST['email'];
  9. $telephone = $_POST['telephone'];
  10. $other = $_POST['other'];
  11.  
  12. $msg = "Imię: $firstname\n" .
  13. "Nazwisko: $last_name\n" .
  14. "email: $email\n" .
  15. "telephone: $telephone\n" .
  16. "Inne komentarze: $other";
  17.  
  18. $headers = 'From: ' . $_POST['email'] . "\r\n" .
  19. 'Content-type: text/html; charset=utf-8';
  20.  
  21. mail($email_to, $email_subject, $msg, $headers);
  22. echo 'Wszystko ok';
  23.  
  24. ?>


  1. <form name="contactform" method="post" action="report.php">
  2.  
  3. <table width="750px" cellspacing="10">
  4.  
  5. <tr>
  6.  
  7. <td valign="top">
  8.  
  9. <label for="firstname">Imię: *</label>
  10.  
  11. </td>
  12.  
  13. <td valign="top">
  14.  
  15. <input type="text" id="firstname" name="firstname" />
  16.  
  17. </td>
  18.  
  19. </tr>
  20.  
  21. <tr>
  22.  
  23. <td valign="top">
  24.  
  25. <label for="last_name">Nazwisko *</label>
  26.  
  27. </td>
  28.  
  29. <td valign="top">
  30.  
  31. <input type="text" name="last_name" maxlength="50" size="30">
  32.  
  33. </td>
  34.  
  35. </tr>
  36.  
  37. <tr>
  38.  
  39. <td valign="top">
  40.  
  41. <label for="email">Adres e-mail *</label>
  42.  
  43. </td>
  44.  
  45. <td valign="top">
  46.  
  47. <input type="text" name="email" maxlength="80" size="30">
  48.  
  49. </td>
  50.  
  51. </tr>
  52.  
  53. <tr>
  54.  
  55. <td valign="top">
  56.  
  57. <label for="telephone">Numer telefonu</label>
  58.  
  59. </td>
  60.  
  61. <td valign="top">
  62.  
  63. <input type="text" name="telephone" maxlength="30" size="30">
  64.  
  65. </td>
  66.  
  67. </tr>
  68.  
  69. <tr>
  70.  
  71. <td valign="top">
  72.  
  73. <label for="other">Pytania, uwagi *</label>
  74.  
  75. </td>
  76.  
  77. <td valign="top">
  78.  
  79. <textarea name="msg" maxlength="1000" cols="25" rows="6"></textarea>
  80.  
  81. </td>
  82.  
  83. </tr>
  84.  
  85. <tr>
  86.  
  87. <td colspan="2" style="text-align:center">
  88.  
  89. <input type="submit" value="Submit">
  90.  
  91. </td>
  92.  
  93. </tr>
  94.  
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 27.09.2025 - 05:44