-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwysPytania.php
More file actions
47 lines (42 loc) · 977 Bytes
/
wysPytania.php
File metadata and controls
47 lines (42 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css"/>
<script src="jquery-2.1.4.min.js"></script>
<script src="scripts.js"></script>
<title>Quizer</title>
</head>
<body style="width:578px; margin-left: auto; margin-right: auto;">
<div id="wynik"> </div>
<?php
session_start();
include "polaczenie.php";
$ilePytan = null;
if(isset($_POST['ilePytan']) && $_POST['ilePytan'] == "40")
{
$ilePytan = 40;
}
else
{
$ilePytan = 1;
}
$kategoriapost = $_POST['kategoria'];
$tabPyt = pobierz_liczbe_pytan($kategoriapost);
$liczbaPytanWKat = count($tabPyt);
//echo $liczbaPytanWKat;
if($ilePytan == 1)
{
losuj_jedno_pytanie($kategoriapost);
}
else if($ilePytan == 40 && $liczbaPytanWKat > 40)
{
losuj_czterdziesci_pytan($kategoriapost);
echo '<div id="czas"><script>getStartTime();minutnik2()</script> </div>';
}
else
{
echo 'Nie ma odpowiedniej liczby pytan w tej kategorii.';
}
?>
</body>
</html>