-
Notifications
You must be signed in to change notification settings - Fork 0
/
O+.php
78 lines (74 loc) · 2.33 KB
/
O+.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
<?php
// Initialize the session
session_start();
// Check if the user is logged in, if not then redirect him to login page
if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
header("location: welcome.php");
exit;
}
require "connection.php";
$Blood_Type = 'O+';
$sql = "SELECT * FROM donor_information_table WHERE Blood_Type = '$Blood_Type' ";
$get_data = mysqli_query($link, $sql);
mysqli_close($link);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="100;url=welcome.php" />
<link rel="icon" href="assets/icons/title_icon.png" sizes="320x320" type="image/png">
<title>
O+
</title>
<style>
body {
display: flex;
background-color: #F6F5FF;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
</style>
</head>
<body>
<div>
<table align="center" border="1px"
style="width:1000px; line-height:40px; border-collapse: collapse; border: 2px solid black; margin-top: 10px;">
<tr>
<th colspan="11">
<?php echo htmlspecialchars($Blood_Type); ?> Owners</h>
</th>
</tr>
<t>
<th> Blood Type</th>
<th> User ID</th>
<th> Name </th>
<th> Age </th>
<th> Last Donation</th>
<th> Location</th>
<th> UserType</th>
<th> E-mail </th>
<th> Phone</th>
<th> Health Problem</th>
</t>
<?php
while ($row = mysqli_fetch_assoc($get_data)) {
echo '<tr>
<td> ' . $row['Blood_Type'] . '</td>
<td> ' . $row['User_ID'] . '</td>
<td> ' . $row['Name'] . '</td>
<td> ' . $row['Age'] . '</td>
<td> ' . $row['Last_Donation'] . '</td>
<td> ' . $row['Location'] . '</td>
<td> ' . $row['UserType'] . '</td>
<td> ' . $row['E_mail'] . '</td>
<td> ' . $row['Phone'] . '</td>
<td> ' . $row['Health_Problem'] . '</td>
</tr>';
}
?>
</table>
</div>
</body>
</html>