-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_test.php
More file actions
53 lines (51 loc) · 1.9 KB
/
start_test.php
File metadata and controls
53 lines (51 loc) · 1.9 KB
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
48
49
50
51
52
53
<?php
session_start();
if(!$_SESSION['user']){
header('Location: index.php');
}
include "includes/connect.php";
include 'views/header.php';
include 'results.php';
include 'includes/test_proccess.php';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="css/test.css">
</head>
<body>
<div class="container">
<div class="content">
<?php if($exists){?>
<form action="start_test.php?id=<?= $test_id?>" method="post">
<input type="hidden" name="q_num" value="<?=$question_num?>">
<div class="sui" style="text-align: center">
question <?=$question_num?>/<?=$cnt_of_rows?>
</div>
<div class="card" style="text-align: center">
<span style="color: #d33333">Question</span> <?= $q_title?>?
</div>
<?php while ($opt=mysqli_fetch_array($opt_query)){?>
<div class="options">
<input type="radio" value="<?= $opt['id']?>" name="ans"><?= $opt['answear_option'];?>
</div>
<?php }?>
<div class="btns">
<?php if($question_num==$cnt_of_rows){?>
<form action="results.php"><button type="submit" class="btn" name="get_res">get res</button></form>
<?php } else{?>
<button type="submit" class="btn" name="nxt">next</button>
<button type="submit" class="btn" name="void">void</button>
<?php }?>
</div>
</form>
<?php }?>
</div>
</div>
</body>
</html>