-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewresults.php
68 lines (64 loc) · 1.66 KB
/
viewresults.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
<?php
include("header.php");
if(isset($_GET[delid]))
{
$sqldel ="DELETE FROM results where resultid=$_GET[delid]";
$seldelresult = mysqli_query($con,$sqldel);
if(mysqli_affected_rows($con) == 1)
{
$delresult = "<font color=green><strong>Record deleted successfully..</strong></font>";
}
}
$selresults = "SELECT results.*,students.fname,students.lname FROM results INNER JOIN students ON results.studentid = students.studentid";
$selresult = mysqli_query($con,$selresults);
?>
<div class="slider_top2">
<h2>View results</h2>
</div>
<div class="clr"></div>
<div class="body_resize">
<div class="body">
<div class="left">
<p>
<?php
echo $delresult;
echo "<table class=tftable width=200 border=1>
<tr>
<th scope=col> result id</th>
<th scope=col> certificate id</th>
<th scope=col> student name</th>
<th scope=col> que id</th>
<th scope=col> answer</th>
<th scope=col> Action</th>
</tr>";
while($rs = mysqli_fetch_array($selresult))
{
echo "
<tr>
<td> $rs[resultid]</td>
<td> $rs[certificateid]</td>
<td> $rs[fname] $rs[lname]</td>
<td> $rs[queid]</td>
<td> $rs[answer]</td>
<td> <a href=results.php?resultid=$rs[resultid]>Edit</a> |
<a href=viewresults.php?delid=$rs[resultid]>Delete</a>
</td>
</tr>";
}
?>
</table>
</p>
<p> </p>
<p> </p>
</div>
<div class="right">
<?php
include("usersidebar.php");
?>
</div>
<div class="clr"></div>
</div>
</div>
<?php
include("footer.php");
?>