Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Formularz kontaktowy
kamilo90
post
Post #1





Grupa: Zarejestrowani
Postów: 33
Pomógł: 0
Dołączył: 8.08.2008

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


Głowie się i głowie i nie wiem czemu mój formularz nie działa sad.gif nie moge znaleźć żadnego błędu :/
Proszę jakiegoś speca o looknięcie w kod (dla was to będzie minutka)

  1. <?php
  2. if (empty($_POST['submit'])) {
  3.  
  4.    echo '<table align="center" border="0" cellspacing="3" cellpadding="0"><form method="post">
  5. <tr>
  6. <td align="right" class="uni_01">subject </td>
  7. <td class="uni_01">
  8. <input type="text" name="imie" size="35" value="" class="kontakt"></td>
  9. </tr>
  10. <tr>
  11. <td align="right" class="uni_01">e-mail </td>
  12. <td class="uni_01">
  13. <input type="text" name="email" size="35" value="" class="kontakt">
  14. </td>
  15. </tr>
  16. <tr>
  17. <td align="right" class="uni_01">message </td>
  18. <td class="uni_01">
  19. <textarea name="tresc" cols="50" rows="14"></textarea>
  20. </td>
  21. </tr>
  22. <tr>
  23. <td align="right" valign="top" class="uni_01">&nbsp;</td>
  24.  
  25. <td class="uni_01">
  26. <input style="font-weight: bold;" type="submit" name="submit" value="submit">
  27. <input type="reset" value="reset"></form>
  28. </td>
  29. </tr>
  30. </table>';
  31. }
  32. elseif (!empty($_POST['tresc']) && !empty($_POST['imie']) && !empty($_POST['email'])) {
  33.    $message = 'Temat: $_POST[imie]\n\nTreśc wiadomości: $_POST[tresc]';
  34.    $header = 'From: $_POST[email] <$_POST[email]>';
  35.    @mail("kawex@scores24.net","KaweX.com - $_POST[imie]","$message","$header")
  36.    or die('Nie udalo sie wyslac wiadomości');
  37.  
  38.   echo '<center><font color="#C3A54D">Your email has been sent.<br><br>We will contact you as soon as possible.</font></center>
  39. <script type="text/javascript">setTimeout('window.location.href=http://kawex.com',7000)</script>';
  40. }
  41. else echo '<center><blink><font color="#C3A54D">!!</font></blink> Do not leave any fields blank <blink><font color="#C3A54D">!!</font></blink><br><br>[ <a href="contact">back</a> ] </center>';
  42.  
  43. ?>
Go to the top of the page
+Quote Post

Posty w temacie


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: 20.08.2025 - 04:24