-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathviewuserresult.php
More file actions
116 lines (91 loc) · 3.39 KB
/
Copy pathviewuserresult.php
File metadata and controls
116 lines (91 loc) · 3.39 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
session_start();
include("session.php");
error_reporting(1);
require("connect.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login - Dynamic Online Exam Software</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet"/>
<link href="font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet" />
<link rel="stylesheet" href="css/semantic.min.css"/>
<!-- Custom CSS -->
<link href="css/logo-nav.css" rel="stylesheet">
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
<img src="images/download.png" height="40px" alt="logoQuiz" >
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1" >
<ul class="nav navbar-nav">
<li class="pull-right">
<a href="#"></a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<h1 style="color:grey" align="center">RESULT</h1>
<div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Result</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "doe";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$logid = $_SESSION['login'];
$sql = "SELECT * FROM result where loginid = '$logid'";
foreach ($conn->query($sql) as $row) {
echo '<tr>';
echo '<td>'. $row['result'] . '</td>';
echo '<td>'. $row['date'] . '</td>';
echo '<tr>';
}
$conn->close();
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>