-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewans.php
61 lines (56 loc) · 1.27 KB
/
viewans.php
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
54
55
56
57
58
<?php
$filepath = realpath(dirname(__FILE__));
include_once ($filepath.'/inc/header.php');
Session::checkSession();
$total = $exam->getTotalRows();
?>
<div class="row">
<div class="col-md-12 text-center">
<h2>All Question & Answer of : <?php echo $total; ?></h2>
</div>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$process = $pro->processData($_POST);
}
?>
<div class="container">
<div class="row">
<div class="test">
<table>
<?php
$getQues = $exam->getQuesByOrder();
if ($getQues) {
while ($Question = $getQues->fetch_assoc()) {
?>
<tr>
<td colspan="2">
<h3>Ques <?php echo $Question['quesNo']; ?>: <?php echo $Question['ques']; ?></h3>
</td>
</tr>
<?php
$number = $Question['quesNo'];
$answer = $exam->getAnswer($number);
if ($answer) {
while ($result = $answer->fetch_assoc()) {
?>
<tr>
<td>
<input type="radio"/>
<?php
if ($result['rightAns'] == '1') {
echo "<span style='color:green;font-weight:bold'>".$result['ans']."</span>";
} else {
echo $result['ans'];
}
?>
</td>
</tr>
<?php } } ?>
<?php } } ?>
</table>
</div>
</div>
<br/>
</div>
<?php include 'inc/footer.php'; ?>