-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathannouncementDetails.php
75 lines (59 loc) · 1.28 KB
/
announcementDetails.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
<?php
require 'dbconfig/config.php';
?>
<html>
<head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/homepage.css" rel="stylesheet">
</head>
<body>
<?php
$an_id = $_GET['id'];
$sql="SELECT * FROM announcement WHERE An_ID = '$an_id'";
$date = "";
$category = "";
$title = "";
$description = "";
$res=mysqli_query($con,$sql)
or die(mysqli_error($con));
if($res)
{
while($row=mysqli_fetch_row($res))
{
$date = $row[1];
$category = $row[3];
$title = $row[4];
$description = $row[5];
}
}
/*<tr>
<td>Description</td>
</tr>
<tr>
<td>$description</td>
</tr>*/
echo "<div class='panel panel-default'>
<div class='panel-body'>
<table class='table table-striped table-hover'>
<tr>
<td>Date</td>
<td>$date</td>
</tr>
<tr>
<td>Category</td>
<td>$category</td>
</tr>
<tr>
<td>Title</td>
<td>$title</td>
</tr>
</table>";
echo "Desription : <br><br>
$description";
echo "</div></div>";
//else{
// echo "error".mysql_error();
//}
?>
</body>
</html>