Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] błąd, nie wiem jak nazwać temat
Inaro
post
Post #1





Grupa: Zarejestrowani
Postów: 132
Pomógł: 0
Dołączył: 4.03.2010

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


Hej, mam taki problem z kodem PHP ponieważ zrobiłem quiz na stronie i za ten quiz odpowiada też inny plik (nazwa gora.php) mam taki kod poniższy NR 1 no więc gdy odpowiem dobrze lub nawet źle i klikam na 'Wyślij' w quizie to powinno mnie przekierunkować na adresforum/usercp.php?action=top (ten kod niżej odpowiada za to) lecz daje mnie do samego usercp.php

NR 1:
  1. <head>
  2. <title>{$mybb->settings['bbname']} - Przejdź dalej/Popraw błędy!</title>
  3. {$headerinclude}
  4. </head>
  5. {$header}
  6. <table width="100%" border="0" align="center">
  7. <tr>
  8. {$usercpnav}
  9. <td valign="top">
  10. {$errors}
  11. <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
  12. <tr>
  13. <td class="thead" colspan="2"><strong>Przejdź dalej/Popraw błędy!</strong></td>
  14. </tr>
  15. <tr>
  16. <td class="tcat" colspan="2"><strong>Przejdź dalej/Popraw błędy!</strong></td>
  17. </tr>
  18. <tr>
  19. <td class="trow2" width="40%"><strong><center><iframe scrolling="no" height="600"" frameborder="0" width="600" src="gora.php"></iframe></center></strong><br /><br /></td>
  20. </tr>
  21. <br />
  22. </td>
  23. </tr>
  24. {$footer}
  25. </body>


góra.php
  1. <?php
  2. $punkt = 0;
  3. $wykonal = false;
  4. if (!empty($_GET['f5']))
  5. {
  6. if ($_GET['f5'] == '1') $punkt += "0";
  7. if ($_GET['f5'] == '2') $punkt += "0";
  8. if ($_GET['f5'] == '3') $punkt += "0";
  9. if ($_GET['f5'] == '4') $punkt += "1";
  10. }
  11. if (!empty($_GET['f6']))
  12. {
  13. if ($_GET['f6'] == '1') $punkt += "0";
  14. if ($_GET['f6'] == '2') $punkt += "0";
  15. if ($_GET['f6'] == '3') $punkt += "0";
  16. if ($_GET['f6'] == '4') $punkt += "1";
  17. }
  18. if (!empty($_GET['f7']))
  19. {
  20. if ($_GET['f7'] == '1') $punkt += "1";
  21. if ($_GET['f7'] == '2') $punkt += "0";
  22. if ($_GET['f7'] == '3') $punkt += "0";
  23. if ($_GET['f7'] == '4') $punkt += "0";
  24. }
  25. if (!empty($_GET['f8']))
  26. {
  27. if ($_GET['f8'] == '1') $punkt += "0";
  28. if ($_GET['f8'] == '2') $punkt += "1";
  29. if ($_GET['f8'] == '3') $punkt += "0";
  30. if ($_GET['f8'] == '4') $punkt += "0";
  31. }
  32. if (!empty($_GET['f9']))
  33. {
  34. if ($_GET['f9'] == '1') $punkt += "1";
  35. if ($_GET['f9'] == '2') $punkt += "0";
  36. if ($_GET['f9'] == '3') $punkt += "0";
  37. if ($_GET['f9'] == '4') $punkt += "0";
  38. }
  39. if (!empty($_GET['f10']))
  40. {
  41. if ($_GET['f10'] == '1') $punkt += "1";
  42. if ($_GET['f10'] == '2') $punkt += "0";
  43. if ($_GET['f10'] == '3') $punkt += "0";
  44. if ($_GET['f10'] == '4') $punkt += "0";
  45. }
  46. if (!empty($_GET['f11']))
  47. {
  48. if ($_GET['f11'] == '1') $punkt += "0";
  49. if ($_GET['f11'] == '2') $punkt += "0";
  50. if ($_GET['f11'] == '3') $punkt += "1";
  51. if ($_GET['f11'] == '4') $punkt += "0";
  52. }
  53. if (!empty($_GET['f12']))
  54. {
  55. if ($_GET['f12'] == '1') $punkt += "0";
  56. if ($_GET['f12'] == '2') $punkt += "0";
  57. if ($_GET['f12'] == '3') $punkt += "0";
  58. if ($_GET['f12'] == '4') $punkt += "1";
  59. }
  60. if (!empty($_GET['f13']))
  61. {
  62. if ($_GET['f13'] == '1') $punkt += "0";
  63. if ($_GET['f13'] == '2') $punkt += "1";
  64. if ($_GET['f13'] == '3') $punkt += "0";
  65. if ($_GET['f13'] == '4') $punkt += "0";
  66. }
  67. if (!empty($_GET['f14']))
  68. {
  69. if ($_GET['f14'] == '1') $punkt += "0";
  70. if ($_GET['f14'] == '2') $punkt += "1";
  71. if ($_GET['f14'] == '3') $punkt += "0";
  72. if ($_GET['f14'] == '4') $punkt += "0";
  73. }
  74. if($punkt <= 9) {
  75. echo "<p><span style=\"color: #CC0000\">Formularz został błędnie uzupełniony, popraw błędy.</span></p>";
  76. $wykonal = false;
  77. }
  78. else {
  79. echo "<p><span style=\"color: #66CC00\">Gratulację wszystkie odpowiedzi podane przez Ciebie są poprawne, miłej gry!</span></p>";
  80. echo "<p><a href=\"rejestracja4.php\" style=\"width:100%\">PrzejdĽ do formularza zakładania postaci</a></p>";
  81. $wykonal = true;
  82. }
  83. ?>
Go to the top of the page
+Quote Post

Posty w temacie
- Inaro   [PHP] błąd   27.09.2010, 19:08:19
- - zordon   a gdzie masz kod formularza? Za to, gdzie zostaną ...   27.09.2010, 19:42:10


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 - 16:07