-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathipc_view.php
70 lines (47 loc) · 1.51 KB
/
ipc_view.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
<?php
require 'header.php';
if(isset($_SESSION['userUidOfficer'])){
include_once 'includes/dbh.inc.php';
//require'header.php';
}else{
header("Location: ./failure.php");
exit();
}
//require 'header.php';
$sql="SELECT * FROM Crime";
$result=mysqli_query($conn,$sql);
$resultCheck=mysqli_num_rows($result);
if($resultCheck > 0){?>
<style>.foot{padding-top:55px;}</style>
<section class="text-gray-700 body-font relative">
<h1 class="text-3xl text-center">
List of all important IPC Sections
</h1>
<div class="container text-center px-5 my-5 mx-auto">
<div class="flex items-center justify-center bg-gray-50 pt-12 pb-56 px-4 sm:px-6 lg:px-8">
<table class="table-fixed">
<thead>
<tr>
<th class="w-1/2 px-7 py-2">IPC</th>
<th class="w-1/2 px-7 py-2">Description</th>
</tr>
</thead>
<tbody>
<?php
while($row=mysqli_fetch_assoc($result)){ ?>
<tr>
<td class="border px-4 py-2"><?php echo"Section ".$row['IPC']."<br>";?></td>
<td class="border px-4 py-2"><?php echo$row['Description']."<br>";?></td>
</tr>
<?php }?>
</tbody>
</table>
<?php }
?>
</div>
</div>
</section>
<footer class="foot">
<?php
require'footer.php';?>
</foooter>