forked from iiitncommunity/hostel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notice.php
48 lines (39 loc) · 978 Bytes
/
notice.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
<?php
require 'header.php'
?>
<br>
<main class="jumbotron bg-light" style="text-align:center;">
<?php
if(isset($_SESSION['type'])){
require 'includes/dbh.inc.php';
$sql = "SELECT * FROM notices ";
$result=mysqli_query($conn,$sql);
if($result){
echo '<table class="table">
<thead>
<tr>
<th scope="col">Notices</th>
</tr>
</thead>
<tbody>';
while($row = mysqli_fetch_assoc($result))
{
echo '<tr>
<td> <a href='.$row['noticelink'].'>'.$row['noticetext'].'</a> '.'</td>
</tr>';
}
echo '</tbody>
</table>';
}else{
echo 'Error :'.mysqli_error($conn);
}
}
else{
echo 'Error';
}
?>
</main>
<br>
<?php
require 'footer.php'
?>