forked from nikhilraote/Crime-Record-Managment-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcriminaltable.php
137 lines (108 loc) · 1.97 KB
/
criminaltable.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
$conn=mysqli_connect("localhost","root","","crms");
$query="select * from criminal";
$res=mysqli_query($conn,$query);
if(isset($_POST['sub']))
{
$id=$_POST['search'];
$query="select * from criminal where C_no='$id'";
$res=mysqli_query($conn,$query);
// $row=mysqli_fetch_assoc($res);
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<div class="head">
<form action="criminaltable.php" method="post">
<input type="text" name="search" placeholder="Enter C no " id="search">
<button name="sub" id="sub">submit</button>
</form>
</div>
</head>
<body>
<table >
<tr>
<th>Photo</th>
<th>FNO</th>
<th>CNO</th>
<th>Name</th>
<th>Aadhar no</th>
<th>IPC Section</th>
</tr>
<?php
while ($row=mysqli_fetch_assoc($res)) {
$img= "<dt><strong></strong></dt><dd>" .
'<img src="data:image/jpeg;base64,'.
base64_encode($row['imgdata']).
'" width="150" height="150" ">' . "</dd>";
?>
<tr>
<td><?php echo $img?></td>
<td><?php echo $row['F_no']?></td>
<td><?php echo $row['C_no']?></td>
<td><?php echo $row['C_name']?></td>
<td><?php echo $row['C_aadhar']?></td>
<td><?php echo $row['C_ipsec']?></td>
</tr>
<?php
}
?>
</table>
<style type="text/css">
.head{
margin-left:40%;
position: relative;
}
input{
width: 250px;
height: 35px;
border-radius: 10px;
font-size: 23px;
padding-left: 10px;
margin-top: 3px;
position: absolute;
}
#search:focus{
border: 2px solid #0852c9;
}
button{
width: 100px;
height: 35px;
border-radius: 10px;
border:none;
background-color:#0852c9;
color: white;
font-weight: bold;
position: absolute;
margin-top:5px;
left: 32%;
}
table{
position: absolute;
top: 20%;
left: 10%;
width: 80%;
border-collapse: collapse;
}
td
{
width: 40px;
text-align: center;
border-bottom:3px solid black;
padding:6px;
font-size: 20px;
color:#0852c9;
font-weight: bold;
}
th{
height: 20px;
font-weight: bold;
font-size: 25px;
border-bottom:3px solid black;
padding: 6px;
}
</style>
</body>
</html>