Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][PHP]PHP, wynik z formularza nie zawiera tekstu z "textarea", nie ma wyniku z textarea
eewcia
post
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 7.09.2015

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


Witam,

Wynik z formularza kontaktowego nie zawiera tekstu wpisywanego w textarea, jest tylko " message:" i puste miejsce.
Oto skrypt:
  1. $name=addslashes($_POST['name']);
  2. $subject=addslashes($_POST['subject']);
  3. $email=addslashes($_POST['email']);
  4. $comments=addslashes($_POST['message']);
  5.  
  6. //------------------------
  7.  
  8. $toemail = "xxx@wp.pl";
  9. $subject = "xxx.eu";
  10.  
  11. $headers = "MIME-Version: 1.0\n"
  12. ."From: \"".$name."\" <".$email.">\n"
  13. ."Content-type: text/html; charset=iso-8859-1\n";
  14.  
  15. $body ="";
  16. $body .= "Name:".$name."<br>\n";
  17. $body .="Subject:".$subject."<br>\n";
  18. $body .="Email:".$email."<br>\n";
  19. $body .="Message:".$message."<br>\n";
  20.  
  21.  
  22. if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
  23. {
  24. echo "That is not a valid email address. Please return to the"
  25. ." previous page and try again.";
  26. }
  27.  
  28. mail($toemail, $subject, $body, $headers);
  29. echo "Thanks for submitting your comments";
  30. ?>


Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.09.2025 - 20:16