-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshowdata.php
82 lines (67 loc) · 2.83 KB
/
showdata.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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<title>Plasma Donation</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" href="/index.html" style="max-width: 4%;">
<img src="/hospi.png" class="img-fluid">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="/index.html">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/REGISTERprotoplasma.html">Donate Plasma</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/REQUESTprotoplasma.html">Search Donor</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/ADMINlogin.html">Admin</a>
</li>
</ul>
</div>
</nav>
<div class="container col-5 mt-lg-4">
<h2 class="text-danger">Available Donors</h2>
<table class="table table-striped"> <tr> <th> NAME </th> <th> MOBILE </th> <th> EMAIL </th> <th> BLOOD </th> <th> RECOVERED DATE </th></tr>
<?php
$link = mysqli_connect("sql309.epizy.com", "epiz_28490176", "Yjx7sbh3Pf9fB", "epiz_28490176_plasma");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$blood_group = mysqli_real_escape_string($link, $_REQUEST['blood_group']);
$sql = "SELECT * FROM plasma WHERE blood_group='$blood_group'";
$result = $link->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo ("<tr><td>" . $row["first_name"]. "</td><td>" . $row["mob_number"]. "</td><td>" . $row["email_id"]. "</td><td>" . $row["blood_group"]. "</td><td>" . $row["recovered_date"]. "</td></tr>");
}
} else {
echo "0 results";
}
mysqli_close($link);
?>
</table>
<br><br>
<a href="/index.html" >
<button type="submit" class="btn btn-success form-control btn-block">Back to Home</button>
</a>
</div>
</body>
</html>