-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndex.php
More file actions
53 lines (52 loc) · 1.73 KB
/
Index.php
File metadata and controls
53 lines (52 loc) · 1.73 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
<?php
session_start();
?>
<html>
<title>
Fetch Data From Database
</title>
<link href="style1.css" type="text/css" rel="stylesheet"/>
<body>
<h1><center style="font-size:50px">Time for Action</center></h1>
<table align="center" border="1px" bgcolor="brown" style="width:600px; line-height:40px;">
<tr>
<th colspan="9" ><h2>CRIMINAL LIST</h2></th>
</tr>
<th>image</th>
<th>name</th>
<th>sex</th>
<th>hair</th>
<th>eyes</th>
<th>height</th>
<th>weight</th>
<th>finger</th>
<th>glass</th>
<?php
$conn=mysqli_connect("localhost","root","","criminalreg");
if($conn->connect_error)
{
die("connection failed:" . $conn->connect_error);
}
$sql="SELECT * from criminal ";
$result=$conn->query($sql);
while($rows=mysqli_fetch_assoc($result))
{
echo "
<tr>
<td>".$rows['image']."</td>
<td>".$rows['name']."</td>
<td>". $rows['sex']."</td>
<td>".$rows['hair']."</td>
<td>".$rows['eyes']."</td>
<td>".$rows['height']."</td>
<td>".$rows['weight']."</td>
<td>".$rows['finger']."</td>
<td>".$rows['glass'];
}
echo"</table>";
$conn->close();
?>
<h1> <a href="logout.php">logout</a></h1>
</table>
</body>
</html>