Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Skrypt, Problem :(
DvL
post 15.10.2010, 16:26:07
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 10.10.2010

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


Witam!

Ściągnełem darmowy szablon WWW (nie chciało mi się robić) i umieściłem w nim taki kod:
  1. <?php
  2.  
  3. if (count($_POST))
  4. {
  5.  
  6. $email = 'dvl@cseuforia.xaa.pl'; // Adres e-mail adresata
  7. $subject = 'Zapis do ligi'; // Temat listu
  8. $message = '<center><br><b>W ciągu 48h zostaniesz dodany do listy uczestników</b></center>'; // Komunikat
  9. $error = 'Wystąpił błąd podczas wysyłania formularzu!'; // Komunikat błędu
  10. $charset = 'iso-8859-2'; // Strona kodowa
  11.  
  12. $head =
  13. "MIME-Version: 1.0\r\n" .
  14. "Content-Type: text/plain; charset=$charset\r\n" .
  15. "Content-Transfer-Encoding: 8bit";
  16.  
  17. $body = '';
  18. foreach ($_POST as $name => $value)
  19. {
  20. if (is_array($value))
  21. {
  22. for ($i = 0; $i < count($value); $i++)
  23. {
  24. $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value[$i]) : $value[$i]) . "\r\n";
  25. }
  26. }
  27. else $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n";
  28. }
  29. echo mail($email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
  30. }
  31. else
  32. {
  33.  
  34. ?>
  35. <form action="?" method="post">
  36. <table>
  37.  
  38. <tr>
  39. <td>
  40. <b>Nick:<b>
  41. </td>
  42. <td>
  43. <input type="text" name="Nick"> <br>
  44. </td>
  45. </tr>
  46. <tr>
  47.  
  48. <tr>
  49. <td>
  50. <b>Gadu-Gadu:</b>
  51. </td>
  52. <td>
  53. <input type="text" name="Gadu-Gadu"> <br>
  54. </td>
  55. </tr>
  56.  
  57. <tr>
  58. <td>
  59. <b>Nazwa druzyny</b>
  60. </td>
  61. <td>
  62. <input type="text" name="Nazwa druzyny"> <br>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td>
  67. <b>Gracze (oddziel przecinkami):</b>
  68. </td>
  69. <td>
  70. <input type="text" name="Gracze"> <br>
  71. </td>
  72. </tr>
  73.  
  74. <tr>
  75. <td><br>
  76. <input type="submit" value="Wyślij formularz!">
  77. </td>
  78. </tr>
  79.  
  80. </table>
  81. </form>
  82. </td></tr>
  83. <tr><td class="doln"></td></tr>
  84. </table>
  85. </td>
  86. </tr>
  87. </table>


I pojawia mi się taki komunikat:
  1. Parse error: syntax error, unexpected $end in /home/p63939/public_html/liga/zapisy.php on line 135


Proszę o odpowiedź
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 7)
nospor
post 15.10.2010, 16:36:33
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Otwierasz { ale go nie zamykasz.


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
DvL
post 15.10.2010, 16:48:43
Post #3





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 10.10.2010

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


Dziękuję smile.gif

Już ci dałem ,,Pomógł"

Ale dalej jest ten problem sad.gif
Go to the top of the page
+Quote Post
nospor
post 15.10.2010, 17:06:42
Post #4





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




To pokaz kod po zmianach


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
DvL
post 15.10.2010, 17:25:35
Post #5





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 10.10.2010

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


  1. }
  2. else
  3. {


Tylko to usunloem.
Go to the top of the page
+Quote Post
nospor
post 15.10.2010, 17:29:38
Post #6





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Jak juz cos to usunac nalezalo tylko
else
{



--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
virtimus
post 15.10.2010, 22:59:21
Post #7





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 15.10.2010

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


Hiehie - a jeszcze lepiej dodać "<?php } ?>" na samym końcu smile.gif
Go to the top of the page
+Quote Post
DvL
post 16.10.2010, 14:03:33
Post #8





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 10.10.2010

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


nospor dałem ci już

Do zamkniecia
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 19.07.2025 - 19:44