-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewcourse.php
63 lines (57 loc) · 1.42 KB
/
viewcourse.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
<?php
include("header.php");
if(isset($_GET[delid]))
{
$sqldel ="DELETE FROM course where courseid=$_GET[delid]";
$seldelresult = mysqli_query($con,$sqldel);
if(mysqli_affected_rows($con) == 1)
{
$delresult = "<font color=green><strong>Record deleted successfully..</strong></font>";
}
}
?>
<div class="slider_top2">
<h2>View course</h2>
</div>
<div class="clr"></div>
<div class="body_resize">
<div class="body">
<div class="full">
<?php
echo $delresult;
echo "<table class=tftable width=600 border=1>
<tr>
<th scope=col> Coursename</th>
<th scope=col> description</th>
<th scope=col> status</th>
<th scope=col> Action</th>
</tr>";
$selcourse = "select * from course";
$selresult = mysqli_query($con,$selcourse);
while($rs = mysqli_fetch_array($selresult))
{
echo "<tr>
<td> $rs[coursename]</td>
<td> $rs[description]</td>
<td> $rs[status]</td>
<td> <a href=course.php?courseid=$rs[courseid]>Edit</a> |
<a href=viewcourse.php?delid=$rs[courseid]>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");
?>