Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [Easiest Form2Mail] Problem kodowania
Forum PHP.pl > Forum > Gotowe rozwiązania
Pawel.Dabrowski
Witam.
Po przesłaniu e-maila za pomocą formularza w html i skryptu Easiest Form2Mail pojawiają się krzaczki.

Jak należy ustawic formatowanie formularza?
czy w pliku z formularzem, czy w pliku srkyptu form2mail?

FORMULARZ:
  1. <form method="post" action="kontakt.php">
  2. <table align="center" bgcolor="#cccccc" border="0" cellpadding="0" cellspacing="0" width="500">
  3.  
  4.  
  5. <tr>
  6.  
  7. <td>
  8. <table align="center" border="0" cellpadding="3" cellspacing="1" width="600">
  9.  
  10.  
  11.  
  12. <tr bgcolor="#ffffff">
  13.  
  14. <td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Imię i nazwisko:</font></td>
  15.  
  16. <td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  17. <input size="50" name="name" id="name">
  18. </font></td>
  19.  
  20. </tr>
  21.  
  22. <tr bgcolor="#ffffff">
  23.  
  24. <td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Podaj sw&oacute;j adres e-mail:</font></td>
  25.  
  26. <td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  27. <input size="50" name="email" id="email"> </font></td>
  28.  
  29. </tr>
  30.  
  31. <tr bgcolor="#ffffff">
  32.  
  33. <td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Podaj sw&oacute;j numer telefonu:</font></td>
  34.  
  35. <td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  36. <input size="50" name="telefon" id="telefon"> </font></td>
  37.  
  38. </tr>
  39.  
  40. <tr bgcolor="#ffffff">
  41.  
  42. <td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Podaj sw&oacute;j numer gg </font></td>
  43.  
  44. <td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  45. <input size="50" name="gg" id="gg"> </font></td>
  46.  
  47. </tr>
  48.  
  49.  
  50. <tr bgcolor="#ffffff">
  51.  
  52. <td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Preferujesz kontakt:</font></td>
  53.  
  54. <td align="left"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  55. <label> <input name="preferowany_kontakt" value="email" type="radio"> e-mail</label>
  56. <label> <input name="preferowany_kontakt" value="telefon" type="radio"> telefon</label>
  57. <label> <input name="preferowany_kontakt" value="gadugadu" type="radio">gadu-gadu</label> </font></td>
  58.  
  59. </tr>
  60.  
  61. <tr bgcolor="#ffffff">
  62.  
  63. <td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Podaj sprawe, w jakiej piszesz:</font></td>
  64.  
  65. <td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  66. <input size="50" name="sprawa" id="sprawa"> </font></td>
  67.  
  68. </tr>
  69.  
  70. <tr bgcolor="#ffffff">
  71.  
  72. <td colspan="2" align="center"><textarea name="message" cols="65" rows="5" id="message"></textarea><br><input name="Submit" value="Wyslij na adres ziko56@o2.pl" type="submit"></td>
  73.  
  74. </tr>
  75.  
  76. </tbody>
  77. </table>
  78.  
  79. </td>
  80.  
  81. </tr>
  82.  
  83. </tbody>
  84. </table>
  85.  
  86. </form>
  87.  
  88. </body>
  89. </html>
  90.  


SKRYPT kontakt.php

  1. <?php
  2. # You can use this script to submit your forms or to receive orders by email.
  3. $MailToAddress = "pawel.dabrowski1@interia.pl"; // your email address
  4. $redirectURL = "http://www.web4future.com/thankyou.htm"; // the URL of the thank you page.
  5.  
  6. # optional settings
  7. $MailSubject = "[Message from the contact form]"; // the subject of the email
  8. $MailToCC = ""; // CC (carbon copy) also send the email to this address (leave empty if you don't use it)
  9. # in the $MailToCC field you can have more then one e-mail address like "a@yoursite.com, b@yoursite.com, c@yoursite.com"
  10.  
  11. # If you are asking for a name and an email address in your form, you can name the input fields "name" and "email".
  12. # If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.
  13.  
  14. # If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
  15. # you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple>
  16. # you have to do the same with checkboxes
  17.  
  18. # This script was written by George A. & Calin S. from Web4Future.com
  19. # There are no copyrights in the sent emails.
  20.  
  21. # SPAMASSASSIN RATING: 0.4
  22.  
  23. # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ===================================================
  24. # ver. 1.6.2
  25. if (preg_match ("/".$_SERVER["SERVER_NAME"]."/i", $_SERVER["HTTP_REFERER"])) {
  26. $w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body>";
  27. if (count($_GET) >0) {
  28. reset($_GET);
  29. while(list($key, $val) = each($_GET)) {
  30. $GLOBALS[$key] = $val;
  31. if (is_array($val)) {
  32. $w4fMessage .= "<b>$key:</b> ";
  33. foreach ($val as $vala) {
  34. $vala =stripslashes($vala);
  35. $w4fMessage .= "$vala, ";
  36. }
  37. $w4fMessage .= "<br>";
  38. }
  39. else {
  40. $val = stripslashes($val);
  41. if (($key == "Submit") || ($key == "submit")) { }
  42. else { if ($val == "") { $w4fMessage .= "$key: - <br>"; }
  43. else { $w4fMessage .= "<b>$key:</b> $val<br>"; }
  44. }
  45. }
  46. } // end while
  47. }//end if
  48. else {
  49. reset($_POST);
  50. while(list($key, $val) = each($_POST)) {
  51. $GLOBALS[$key] = $val;
  52. if (is_array($val)) {
  53. $w4fMessage .= "<b>$key:</b> ";
  54. foreach ($val as $vala) {
  55. $vala =stripslashes($vala);
  56. $w4fMessage .= "$vala, ";
  57. }
  58. $w4fMessage .= "<br>";
  59. }
  60. else {
  61. $val = stripslashes($val);
  62. if (($key == "Submit") || ($key == "submit")) { }
  63. else { if ($val == "") { $w4fMessage .= "$key: - <br>"; }
  64. else { $w4fMessage .= "<b>$key:</b> $val<br>"; }
  65. }
  66. }
  67. } // end while
  68. }//end else
  69. $w4fMessage = "<font face=verdana size=2>".$w4fMessage."</font></body></html>";
  70. if (!$email) {$email = "server@site.com";}
  71. if (!mail($MailToAddress, $MailSubject, $w4fMessage, "From: $name <$email>\r\nReply-To: $name <$email>\r\nMessage-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\nMIME-Version: 1.0\r\nX-Priority: 3\r\nX-Mailer: PHP/" . phpversion()."\r\nX-MimeOLE: Produced By Web4Future Easiest Form2Mail v1.5\r\nBCc: $MailToCC\r\nContent-Type: text/html; charset=ISO-8859-1\r\nContent-Transfer-Encoding: 8bit\r\n")) { echo "Error sending e-mail!";}
  72. else { header("Location: ".$redirectURL); }
  73. } else { echo "<center><font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font></center>";}
  74. ?>


PILNE.
Na stronie potrzebuję dwóch formularzy:
- dział kontakt
- dział zamów kurs

Jest to strona dla OSK.

Drugie pytanie: w jaki sposób najlepiej wstawic formularz na stronę. CMS: Quick.cms
grzes999
Zmień

  1. charset=iso-8859-1


na

  1. charset=utf-8


w pliku kontakt.php
Pawel.Dabrowski
Dziękuję, działa.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.