Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Formularz
Zumi
post
Post #1





Grupa: Zarejestrowani
Postów: 38
Pomógł: 0
Dołączył: 15.06.2008

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


Witam serdecznie mam nastepujaca prosbe potrzebuje połączyc ten formularz

  1. <?php
  2. include_once("config.php");
  3.  
  4. ************
  5. $selected = "CONTACT";
  6.  
  7. $showform = TRUE;
  8.  
  9. $sendit = $_REQUEST['sendit'];
  10. $youremail = $_REQUEST['youremail'];
  11. $subject  = $_REQUEST['subject'];
  12. $message  = $_REQUEST['message'];
  13.  
  14. if(isset($sendit)) {
  15. $errorstring = "";
  16. $youremail = strtolower(preparedata($youremail));
  17. if(strlen($youremail) == 0) $errorstring .="Sprecyzuj swój adres E-mail<br>";
  18. if(strlen($subject) == 0) $errorstring .="Sprecyzuj temat wiadomości<br>";
  19. if(strlen($message) == 0) $errorstring .="Wpisac treść wiadomości<br>";
  20. if(strlen($youremail) < 9 || strlen($youremail) > 64) $errorstring .= "SprawdĽ poprawność adresu E-mail<br>";
  21. else
  22. {
  23. $emailtail = strstr($youremail, '@');
  24. if(!strstr($youremail, '@') || !strstr($emailtail, '.')) $errorstring .= "SprawdĽ poprawność adresu E-mail<br>";
  25. }
  26. if(strlen($errorstring) == 0){
  27. $subject = "Kontakt z ".$site_url." Strona - ".$subject;
  28. $sent = mail($site_admin, $subject, $message, "FROM: ".$youremail);
  29. if($sent) $showform = FALSE;
  30. }
  31. }
  32.  
  33. include("header.php");
  34. ?>
  35.  
  36. <table width="100%" cellpadding="10" cellspacing="0"><tr><td valign="top">
  37.  
  38. <?php
  39. if($showform == TRUE) {
  40. ?>
  41. Jeśli masz jakieś pytania lub komentarze dotyczące strony lub usług, jakie oferu
    jemy, nie wahaj sie skontaktować z nami przy użyciu formularza<br><br>
  42. <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
  43. <tr><form method="post" action="contact.html"><input type="hidden" name="sendit" value="yes"><td style="padding:0px;" align="left"><br>
  44. <?php if(strlen($errorstring) > 0) echo "<table cellpadding=\"8\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr><td><font class=\"error\"><b>Znaleziono Błąd:</b><br><br>$errorstring</td></tr></table><br><br>";?>
  45. <table cellpadding="5" cellspacing="0" border="0">
  46. <tr><td width="150"><b>Adres E-mail:</b></td><td><input type="text" name="youremail" class="form" style="width:150px;" value="<?php echo stripslashes($youremail); ?>"></td></tr>
  47. <tr><td><b>Tytuł:</b></td><td><input type="text" name="subject" class="form" style="width:150px;" value="<?php echo stripslashes($subject); ?>"></td></tr>
  48. <tr><td valign="top"><b>Treść:</b></td><td><textarea name="message" class="form" style="width:300px;" rows="6"><?php echo stripslashes($message); ?></textarea></td></tr>
  49. <tr><td></td><td><input type="submit" value="Wyślij" class="form">&nbsp;&nbsp;<input type="reset" value="Wyczyść" class="form"></td></tr>
  50. <tr><td colspan="2" align="right"></td></tr>
  51. </table><br>
  52. </td></form></tr>
  53. </table>
  54. <?php 
  55. }
  56. else echo "<b>Twoja wiadomość została wysłana do Administratora - <b>".$site_name."</b> -. Postaramy się odpowiedzieć w ciągu 48 godzin (2 dni robocze)<br><br>Dziękujemy za zainteresowanie i komentarze<br>Admin Hostingu</b><br><br>";
  57. ?>
  58.  
  59. </td></tr></table>
  60.  
  61. <?php
  62. include("footer.php");
  63. ?>


z tym tokenem?

http://phonik.pl/token2/formularz.php

chodzi mi oto żeby zrobić tak ze najpierw trzeba potwierdzic token w tym czasie wysyłanie miałoby być niemożliwe jesli teken bydzie sie zgadzał to wtedy aktywuje sie ikonka wyslij Bardzo prosze o pomoc gdyz kuleje w temacie php... pozdrawiam Zumi

Ten post edytował Zumi 17.07.2008, 22:22:38


--------------------
zmoderowano - 300 KiB wagi i rozmiar? czytamy regulamin
Go to the top of the page
+Quote Post

Posty w temacie
- Zumi   [PHP] Formularz   17.07.2008, 21:50:47
- - webdicepl   Proszę dodać bbcode.   17.07.2008, 21:52:03
|- - Zumi   Cytat(webdicepl @ 17.07.2008, 22:52:0...   17.07.2008, 22:00:11
- - MMX3   dopisz php w nawiasach kwadratowych.   17.07.2008, 22:09:19
- - Pride   a ty masz skrypt tej Captch'y ? Jak tak to pod...   17.07.2008, 22:44:04
- - Zumi   Cytat(Pride @ 17.07.2008, 23:44:04 ) ...   17.07.2008, 23:57:21
- - Pride   Cytat(Zumi @ 18.07.2008, 00:57:21 ) n...   18.07.2008, 09:13:16
- - -Zumi-   Cytat(Pride @ 18.07.2008, 09:13:16 ) ...   19.07.2008, 19:56:42


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 - 14:10