Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Formularz HTML php
-Gość_Wojtek-
post
Post #1





Goście







Witam,
chciałbym mieć na swojej stronie taki formularz:

[http://www.savcom.com.pl/formularz.html]

Męcze się już od wczoraj, ale nic nie wychodzi.

Plik index.html


  1. <meta name="Description" content="">
  2. <meta name="Keywords" content="">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. </head>
  5. <body topmargin=100 rightmargin=100 leftmargin=200>
  6. T E S T M A I L E R</font><p>
  7. <div align="right"><form action="mailer.php" method=get>
  8. <input type="hidden" name="subject" value="Test Form Results">
  9. Name <input type="text" name="name" size=40 maxlength=40><br>
  10. E-Mail <input type="text" name="email" size=40 maxlength=40><br>
  11. <input type="submit" value="Submit">
  12.  
  13. </form></div>
  14.  
  15. </body>
  16. </html>



Plik mailer.php

  1. <?
  2. /* Form Mailer Program */
  3. /* Edit HTML at bottom of script for HTML output */
  4. /* Š2000 YOA/LSYF/YoAi */
  5.  
  6. $errorpage = "error.htm";
  7. $mailto = "niewiemcosiedzieje2@wp.pl";
  8. $required = array("subject","email"); // what do you wish to require?
  9.  
  10. // edit below this line at your own risk
  11.  
  12. $n = 0;
  13. do {
  14. $r = $required[$n];
  15. if(!$$r) {
  16. print Header("Location: $errorpage");
  17. }
  18. $n++;
  19. } while ($n != count($required));
  20.  
  21. $a = urldecode($QUERY_STRING);
  22. $a = str_replace("&","
  23.  
  24. ",$a);
  25. $a = str_replace("=",": ",$a);
  26. $a = str_replace("@","_AT_",$a);
  27. mail($mailto,$HTTP_GET_VARS["subject"],$a,"From: $mailto");
  28. ?>
  29. <html><head><title>Mail Sent</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  30. </head>
  31. <body>
  32. <h2>Mail sent.</h2>
  33. </body></html>



Mój e-mail niewiemcosiedzieje2@wp.pl
Chce, aby tam przychodziły dane z formularza.
Jak mam to zrobić?
Pozdrawiam


Poprawiłem
~mike_mech
Go to the top of the page
+Quote Post

Posty w temacie
- Gość_Wojtek   Formularz HTML php   14.05.2006, 10:54:52
- - skowron-line   [PHP] pobierz, plaintext <?php $tresc = ...   14.05.2006, 16:10:49


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

 



RSS Aktualny czas: 21.08.2025 - 03:36