-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplayData.php
More file actions
95 lines (79 loc) · 2.13 KB
/
displayData.php
File metadata and controls
95 lines (79 loc) · 2.13 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
$server= "localhost";
$username= "root";
$password= "";
$dbname= "test";
$conn = mysqli_connect($server, $username, $password, $dbname);
if($conn){
?>
<script>
alert('Connecting to the database !!!');
</script>
<?php
}
else{
die("No Connection".mysqli_connect_error());
}
?>
<!DOCTYPE html>
<html>
<head>
<title>View Complaints</title>
<?php include 'link.php'; ?>
<link rel="stylesheet" href="css/styles.css">
<script src="https://use.fontawesome.com/602bbd89d0.js"></script>
</head>
<body>
<nav>
<ul>
<li><a href="login.php">Go Back</a></li>
</ul>
<div class="logo">
<p>ADMIN PORTAL- Currently Viewing Complaints</p>
</div>
</nav>
<div class="main-div">
<h1>Registered Complaints</h1>
<div class="center-div">
<div class="table-responsive">
<table>
<thead>
<tr>
<th>Report ID</th>
<th>Name</th>
<th>Email</th>
<th>Aadhaar No.</th>
<th>Crime Location</th>
<th>Description</th>
<th>Complaint Filing Date</th>
<th colspan="2">Status</th>
</tr>
</thead>
<tbody>
<?php
$selectquery = "select * from crime_reports ";
$query = mysqli_query($conn, $selectquery);
$num = mysqli_num_rows($query);
while($res = mysqli_fetch_array($query)){
?>
<tr>
<td class="id"><?php echo $res['Report ID']; ?></td>
<td><?php echo $res['Name']; ?></td>
<td><?php echo $res['Email'];?> </td>
<td><?php echo $res['Aadhaar No.']; ?></td>
<td><?php echo $res['Crime Location']; ?></td>
<td><?php echo $res['Description']; ?></td>
<td><?php echo $res['Complaint Filing Date']; ?></td>
<td><button class="btn1">Pending </button></td>
<td><button class="btn2"><a href="delete.php?id=<?php echo $res['Report ID']; ?>" >Resolved <i class="fa fa-trash" aria-hidden="true"></i> </a></button></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>