Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> jak dodac adresatow, Formularz kontaktowy
Kynval
post
Post #1





Grupa: Zarejestrowani
Postów: 23
Pomógł: 0
Dołączył: 24.09.2009

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


Chcialbym dowiedziec sie, jak dodac innych adresatow.?


  1. add_to_title($locale['global_200'].$locale['400']);
  2.  
  3. if (isset($_POST['sendmessage'])) {
  4. include_once INCLUDES."securimage/securimage.php";
  5. $error = "";
  6. $mailname = substr(stripinput(trim($_POST['mailname'])), 0, 50);
  7. $email = substr(stripinput(trim($_POST['email'])), 0, 100);
  8. $subject = substr(str_replace(array("\r","\n","@"), "", descript(stripslash(trim($_POST['subject'])))), 0, 50);
  9. $message = descript(stripslash(trim($_POST['message'])));
  10. if ($mailname == "") {
  11. $error .= "ˇ <span class='alt'>".$locale['420']."</span><br />\n";
  12. }
  13. if ($email == "" || !preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $email)) {
  14. $error .= "ˇ <span class='alt'>".$locale['421']."</span><br />\n";
  15. }
  16. if ($subject == "") {
  17. $error .= "ˇ <span class='alt'>".$locale['422']."</span><br />\n";
  18. }
  19. if ($message == "") {
  20. $error .= "ˇ <span class='alt'>".$locale['423']."</span><br />\n";
  21. }
  22. $securimage = new Securimage();
  23. if (!isset($_POST['captcha_code']) || $securimage->check($_POST['captcha_code']) == false) {
  24. $error .= "ˇ <span class='alt'>".$locale['424']."</span><br />\n";
  25. }
  26. if (!$error) {
  27. require_once INCLUDES."sendmail_include.php";
  28. if (!sendemail($settings['siteusername'],$settings['siteemail'],$mailname,$email,$subject,$message)) {
  29. $error .= "ˇ <span class='alt'>".$locale['425']."</span><br />\n";
  30. }
  31. }
  32. if ($error) {
  33. opentable($locale['400']);
  34. echo "<div style='text-align:center'><br />\n".$locale['442']."<br /><br />\n".$error."<br />\n".$locale['443']."</div><br />\n";
  35. closetable();
  36. } else {
  37. opentable($locale['400']);
  38. echo "<div style='text-align:center'><br />\n".$locale['440']."<br /><br />\n".$locale['441']."</div><br />\n";
  39. closetable();
  40. }
  41. } else {
  42.  
  43.  
  44. opentable($locale['400']);
  45. echo $locale['401']."<br /><br />\n";
  46. echo "<form name='userform' method='post' action='".FUSION_SELF."'>\n";
  47. echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
  48. echo "<td width='100' class='tbl'>".$locale['402']."</td>\n";
  49. echo "<td class='tbl'><input type='text' name='mailname' maxlength='50' class='textbox' style='width: 200px;' /></td>\n";
  50. echo "</tr>\n<tr>\n";
  51. echo "<td width='100' class='tbl'>".$locale['403']."</td>\n";
  52. echo "<td class='tbl'><input type='text' name='email' maxlength='100' class='textbox' style='width: 200px;' /></td>\n";
  53. echo "</tr>\n<tr>\n";
  54. echo "<td width='100' class='tbl'>".$locale['404']."</td>\n";
  55. echo "<td class='tbl'><input type='text' name='subject' maxlength='50' class='textbox' style='width: 200px;' /></td>\n";
  56. echo "</tr>\n<tr>\n";
  57. echo "<td width='100' class='tbl'>".$locale['405']."</td>\n";
  58. echo "<td class='tbl'><textarea name='message' rows='10' class='textbox' style='width: 320px'></textarea></td>\n";
  59. echo "</tr>\n<tr>\n";
  60. echo "<td width='100' class='tbl'>".$locale['407']."</td>\n";
  61. echo "<td class='tbl'>";
  62. echo "<img id='captcha' src='".INCLUDES."securimage/securimage_show.php' alt='' align='left' />\n";
  63. echo "<a href='".INCLUDES."securimage/securimage_play.php'><img src='".INCLUDES."securimage/images/audio_icon.gif' alt='' align='top' class='tbl-border' style='margin-bottom:1px' /></a><br />\n";
  64. echo "<a href='#' onclick=\"document.getElementById('captcha').src = '".INCLUDES."securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='".INCLUDES."securimage/images/refresh.gif' alt='' align='bottom' class='tbl-border' /></a>\n";
  65. echo "</td>\n</tr>\n<tr>";
  66. echo "<td class='tbl'>".$locale['408']."</td>\n";
  67. echo "<td class='tbl'><input type='text' name='captcha_code' class='textbox' style='width:100px' /></td>\n";
  68. echo "</tr>\n<tr>\n";
  69. echo "<td align='center' colspan='2' class='tbl'>\n";
  70. echo "<input type='submit' name='sendmessage' value='".$locale['406']."' class='button' /></td>\n";
  71. echo "</tr>\n</table>\n</form>\n";
  72. closetable();
  73. }


czekam na info i z gory dziekuje.

pomoze ktos? :/
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Kynval
post
Post #2





Grupa: Zarejestrowani
Postów: 23
Pomógł: 0
Dołączył: 24.09.2009

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


cos w tym stylu...
nie moja wina, ze nie umiem PHP...
jakbym umial to bym nie uzywal gotowcow...
Go to the top of the page
+Quote Post
bobo168
post
Post #3





Grupa: Zarejestrowani
Postów: 201
Pomógł: 9
Dołączył: 23.08.2006

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


Cytat(Kynval @ 27.10.2009, 13:58:04 ) *
cos w tym stylu...
nie moja wina, ze nie umiem PHP...
jakbym umial to bym nie uzywal gotowcow...


no to kursik php w rękę i się poucz.. stworzenie formularza kontaktowego nie jest wcale trudne i jest mnóstwo artykułów w sieci krok po kroku jak go zrobić.. ale najpierw trzeba znać podstawy php które wcale nie są trudne i nie wymagają jakoś dużo nauki.. ew. zleć to komuś ale wątpię żeby ktoś się podjął tego za darmo jak szanuje swój czas, no chyba że do nauki.. smile.gif
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: 22.08.2025 - 01:59