Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php]Błąd skryptu..... POMOCY
szosti90
post
Post #1





Grupa: Zarejestrowani
Postów: 44
Pomógł: 0
Dołączył: 19.10.2006

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


Mój skrypt wygląda tak:
  1. <?php 
  2. if ($_SESSION['auth'])
  3. {
  4. echo '<html>
  5. ZALOGOWANO POPRAWNIE <a href="index.php?id=postacie"> KLIKNIJ TUTAJ ABY WEJŚĆ</a>';
  6.  
  7.  
  8. if ($_GET['id'] == 'postacie') postacie();
  9. {
  10. if ($_GET['d'] == 'dodaj') 
  11. {
  12. if ($_GET['a'] == 'add') add_postac();
  13. else add_postac_form();
  14. }
  15. if ($_GET['d'] == 'edycja') 
  16. {
  17. if ($_GET['a'] == 'edit') edit_postac();
  18. elseif ($_GET['a'] == 'delete') delete_postac();
  19. elseif ($_GET['a'] == 'add') add_edit_postac();
  20. else edit_postac_form();
  21. }
  22. }
  23.  
  24.  
  25. elseif ($_GET['id'] == 'postacien') postacie_n();
  26. {
  27. if ($_GET['d'] == 'dodaj') 
  28. {
  29. if ($_GET['a'] == 'add') add_postac_n();
  30. else add_postac_form();
  31. }
  32. if ($_GET['d'] == 'edycja') 
  33. {
  34. if ($_GET['a'] == 'edit') edit_postac_n();
  35. elseif ($_GET['a'] == 'delete') delete_postac_n();
  36. elseif ($_GET['a'] == 'add') add_edit_postac_n();
  37. else edit_postac_form_n();
  38. }
  39. }
  40.  
  41.  
  42. }
  43. else {
  44. echo '
  45. <center>
  46. <table border=0>
  47.  
  48. <tr>
  49. <form action="index.php?id=zaloguj" method="post">
  50. <td>Login:</td>
  51. <td><input type="text" name="login" value=""></td>
  52. </tr>
  53. <tr>
  54. <td>Hasło:</td>
  55. <td>
  56. <input type="password" name="haslo" value="">
  57. </td></tr>
  58. <tr><td colspan="2" align="right"><input type="submit" name="submit" value="Loguj"></td>
  59. </form>
  60. </tr>
  61. <tr>
  62. <td colspan="2" align="center"><br>
  63. Powered by <a href="mailto:szosti90@vp.pl">szosti90</a>
  64. </td></tr>
  65. </table>
  66. </center>';
  67. }
  68. ?>
  69. </font></center>
  70. </body>
  71. </html>



Nie działa poprawnie bo wyskakuje mi ten komunikat:

Parse error: syntax error, unexpected T_ELSEIF in /var/www/sites/yoyo.pl/p/r/pralniastats/index.php on line 25

Co tu może być nie tak (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował szosti90 24.01.2007, 17:22:21
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
szosti90
post
Post #2





Grupa: Zarejestrowani
Postów: 44
Pomógł: 0
Dołączył: 19.10.2006

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


Teraz mam tak i nadal nie działa :/
  1. <?php 
  2. if ($_SESSION['auth'])
  3. {
  4. echo '
  5. <a href="index.php?id=postacie">WCHODZE</a> -- <a href="index.php?id=wyloguj">WYLOGUJ</a>';
  6.  
  7. if ($_GET['id'] == 'postacie');
  8. {
  9. if ($_GET['d'] == 'dodaj') 
  10. {
  11. if ($_GET['a'] == 'add') add_postac();
  12. else add_postac_form();
  13. }
  14. if ($_GET['d'] == 'edycja') 
  15. {
  16. if ($_GET['a'] == 'edit') edit_postac();
  17. elseif ($_GET['a'] == 'delete') delete_postac();
  18. elseif ($_GET['a'] == 'add') add_edit_postac();
  19. else edit_postac_form();
  20. }
  21.  }
  22. elseif ($_GET['id'] == 'postacien');
  23. {
  24. if ($_GET['d'] == 'dodaj') 
  25. {
  26. if ($_GET['a'] == 'add') add_postacn();
  27. else add_postacn_form();
  28. }
  29. if ($_GET['d'] == 'edycja') 
  30. {
  31. if ($_GET['a'] == 'edit') edit_postacn();
  32. elseif ($_GET['a'] == 'delete') delete_postacn();
  33. elseif ($_GET['a'] == 'add') add_edit_powstacn();
  34. else edit_postac_nform();
  35. }
  36. }
  37. }
  38. else {
  39. echo '
  40. <center>
  41. <table border=0>
  42.  
  43. <tr>
  44. <form action="index.php?id=zaloguj" method="post">
  45. <td>Login:</td>
  46. <td><input type="text" name="login" value=""></td>
  47. </tr>
  48. <tr>
  49. <td>Hasło:</td>
  50. <td>
  51. <input type="password" name="haslo" value="">
  52. </td></tr>
  53. <tr><td colspan="2" align="right"><input type="submit" name="submit" value="Loguj"></td>
  54. </form>
  55. </tr>
  56. <tr>
  57. <td colspan="2" align="center"><br>
  58. Powered by <a href="">Szosti90</a>
  59. </td></tr>
  60. </table>
  61. </center>';
  62. }
  63.  
  64. ?>




Co jest jeszcze nie tak (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował szosti90 25.01.2007, 09:59:05
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 10.10.2025 - 12:21