-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshowtest.php
61 lines (56 loc) · 1.34 KB
/
showtest.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
<?php
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Online Quiz - Test List</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">
<style>
ul {
margin: 0;
padding: 0;
width:185px;
list-style-type: none;
}
ul li a {
text-decoration: none;
color: white;
padding: 10.5px 11px;
background-color: darkgreen;
display:block;
}
ul li a:visited {
color: white;
}
ul li a:hover, ul li .current {
color: white;
background-color: black;
}</style>
</head>
<body>
<?php
include("header.php");
include("database.php");
extract($_GET);
$rs1=mysqli_query($con,"select * from mst_subject where sub_id=$subid");
$row1=mysqli_fetch_array($rs1);
echo "<h1 align=center><font color=blue> $row1[1]</font></h1>";
$rs=mysqli_query($con,"select * from mst_test where sub_id=$subid");
if(mysqli_num_rows($rs)<1)
{
echo "<br><br><h2 class=head1> No Quiz for this Subject </h2>";
exit;
}
echo "<h2 class=head1> Select Quiz Name to Give Quiz </h2>";
echo "<table align=center>";
while($row=mysqli_fetch_row($rs))
{
echo "<center><ul>
<li><a href=quiz.php?testid=$row[0]&subid=$subid>$row[2]</a></li></center></ul>";
}
echo "</table>";
?>
</body>
</html>