-
Notifications
You must be signed in to change notification settings - Fork 1
/
view_results.php
80 lines (62 loc) · 1.95 KB
/
view_results.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<head>
<link rel="icon" href="favicon.ico" type="image/icon" sizes="16x16">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> Results - Quiz Portal</title>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/bootstrap-theme.min.css"/>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/font.css">
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
</head>
<?php
include('dbConnection.php');
//echo 'hello';
?>
<body>
<div class="panel panel-default">
<div class="panel panel-heading">
<h2 style="text-align:center">Results</h2>
<h2>
<a href="dash.php" class="btn btn-success">Home</a>
</h2>
</div>
<table class="table table-striped">
<tr>
<th>ID</th>
<th>USN</th>
<th>Exam ID</th>
<th>Score</th>
<th>Correct</th>
<th>Wrong</th>
</tr>
<?php
$sql="select * from history where status='finished'"; //where score_updated=true;
$result=mysqli_query($con,$sql) or die('error!');
if($result)
echo "";
else
echo"Error: could not display the results!" . mysqli_error($con);
$sn=0;
$count=0;
while($row=mysqli_fetch_array($result))
{
$sn++;
?>
<tr>
<td> <?php echo $sn; ?> </td>
<td> <?php echo $row['username'] ?> </td>
<td> <?php echo $row['eid'] ?> </td>
<td> <?php echo $row['score'] ?> </td>
<td> <?php echo $row['correct'] ?> </td>
<td> <?php echo $row['wrong'] ?> </td>
</tr
<?php
$count++;
}
?>
</table>
</div>
</body>