This commit is contained in:
Sebastian Ranoszek 2025-01-23 15:52:26 +01:00
parent 566c67c3c8
commit a0c0ad030f
6 changed files with 57 additions and 17 deletions

View File

@ -14,11 +14,23 @@
<a href=""><img src="herb.png" alt="HERB"></a>
</div>
<div class="content">
<?php
session_start();
?>
<div class="form-container">
<form action="page1.php">
<input type="submit" value="ROZPOCZNIJ TEST" class="start">
</form>
</div>
<?php
if (isset($_POST["p5"])) {
if(@$_POST['p5'] == 1385) {
@$_SESSION['punkty']++;
}
echo "<h3>",'Punkty: ', @$_SESSION['punkty'],"</h3>";
echo "<h3>",'Procent: ', $_SESSION['punkty']*100/5, "%</h3>";
}
?>
</div>
</body>
</html>

View File

@ -18,20 +18,24 @@
<?php
session_start();
$_SESSION['zadanie']=1;
$_SESSION['punkty']=0;
echo'Pytanie nr. ', $_SESSION['zadanie']++.' z 5';
?>
</h3>
<div class="form-container">
<form action="page2.php">
<form action="page2.php" method="post">
<h3>UCHWALENIE KONSTYTUCJI 3 MAJA</h3>
<input type="radio" name="p1" id="" value="1788"><span>1788</span><br>
<input type="radio" name="p1" id="" value="1791"><span>1791</span><br>
<input type="radio" name="p1" id="" value="1791"><span>1791*</span><br>
<input type="radio" name="p1" id="" value="1794"><span>1794</span><br>
<input type="radio" name="p1" id="" value="1793"><span>1793</span><br>
<br>
<input type="submit" value="NASTĘPNE PYTANIE" class="next">
</form>
</div>
<?php
echo "<h3>",'Punkty: ', $_SESSION['punkty'],"</h3>";
?>
</div>
</body>
</html>

View File

@ -21,16 +21,22 @@
?>
</h3>
<div class="form-container">
<form action="page3.php">
<form action="page3.php" method="post">
<h3>UNIA LUBELSKA</h3>
<input type="radio" name="p2" id="" value="1648"><span>1648</span><br>
<input type="radio" name="p2" id="" value="1525"><span>1525</span><br>
<input type="radio" name="p2" id="" value="1492"><span>1492</span><br>
<input type="radio" name="p2" id="" value="1569"><span>1569</span><br>
<input type="radio" name="p2" id="" value="1589"><span>1589</span><br>
<br>
<input type="submit" value="NASTĘPNE PYTANIE" class="next">
</form>
</div>
<?php
if(@$_POST['p1'] == 1791) {
@$_SESSION['punkty']++;
}
echo "<h3>",'Punkty: ', $_SESSION['punkty'],"</h3>";
?>
</div>
</body>
</html>

View File

@ -21,7 +21,7 @@
?>
</h3>
<div class="form-container">
<form action="page4.php">
<form action="page4.php" method="post">
<h3>ODZYSKANIE NIEPODLEGŁOŚCI PRZEZ POLSKĘ</h3>
<input type="radio" name="p3" id="" value="1918"><span>1918</span><br>
<input type="radio" name="p3" id="" value="1920"><span>1920</span><br>
@ -31,6 +31,12 @@
<input type="submit" value="NASTĘPNE PYTANIE" class="next">
</form>
</div>
<?php
if(@$_POST['p2'] == 1569) {
@$_SESSION['punkty']++;
}
echo "<h3>",'Punkty: ', $_SESSION['punkty'],"</h3>";
?>
</div>
</body>
</html>

View File

@ -21,16 +21,22 @@
?>
</h3>
<div class="form-container">
<form action="page5.php">
<h3>UCHWALENIE KONSTYTUCJI 3 MAJA</h3>
<input type="radio" name="pytanie1" id=""><span>1788</span><br>
<input type="radio" name="pytanie1" id=""><span>1791</span><br>
<input type="radio" name="pytanie1" id=""><span>1794</span><br>
<input type="radio" name="pytanie1" id=""><span>1793</span><br>
<form action="page5.php" method="post">
<h3>KORONACJA BOLESŁAWA CHROBREGO</h3>
<input type="radio" name="p4" id="" value="1138"><span>1138</span><br>
<input type="radio" name="p4" id="" value="966"><span>966</span><br>
<input type="radio" name="p4" id="" value="1025"><span>1025</span><br>
<input type="radio" name="p4" id="" value="1034"><span>1034</span><br>
<br>
<input type="submit" value="NASTĘPNE PYTANIE" class="next">
</form>
</div>
<?php
if(@$_POST['p3'] == 1918) {
@$_SESSION['punkty']++;
}
echo "<h3>",'Punkty: ', $_SESSION['punkty'],"</h3>";
?>
</div>
</body>
</html>

View File

@ -21,16 +21,22 @@
?>
</h3>
<div class="form-container">
<form action="index.php">
<h3>UCHWALENIE KONSTYTUCJI 3 MAJA</h3>
<input type="radio" name="pytanie1" id=""><span>1788</span><br>
<input type="radio" name="pytanie1" id=""><span>1791</span><br>
<input type="radio" name="pytanie1" id=""><span>1794</span><br>
<input type="radio" name="pytanie1" id=""><span>1793</span><br>
<form action="index.php" method="post">
<h3>UNIA W KREWIE</h3>
<input type="radio" name="p5" id="" value="1138"><span>1138</span><br>
<input type="radio" name="p5" id="" value="966"><span>966</span><br>
<input type="radio" name="p5" id="" value="1385"><span>1385</span><br>
<input type="radio" name="p5" id="" value="1034"><span>1034</span><br>
<br>
<input type="submit" value="NASTĘPNE PYTANIE" class="next">
</form>
</div>
<?php
if(@$_POST['p4'] == 1025) {
@$_SESSION['punkty']++;
}
echo "<h3>",'Punkty: ', $_SESSION['punkty'],"</h3>";
?>
</div>
</body>
</html>