-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdonor variable disp.php
90 lines (86 loc) · 3.15 KB
/
donor variable disp.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
<html>
<form action="procedure.php" method="post">
<center><h2 style='background-color:black;color:#0000ff;opacity:0.9;height:30px'>ENTER THE TYPE OF BLOOD TO SEE THE NUMBER OF DONATIONS</h1></center>
<center><select name = "search_id">
<option selected>TYPE</option>
<option value = "A+">A+</option>
<option value = "A-">A-</option>
<option value = "B+">B+</option>
<option value = "B-">B-</option>
<option value = "AB+">AB+</option>
<option value = "AB-">AB-</option>
<option value = "O+">O+</option>
<option value = "O-">O-</option>
</select>
<input type="submit" value="submit">
</center>
</form>
</html>
<?php
$mysql_id=mysqli_connect("localhost","root","","bloodbank_db");
$query="SELECT `name`,`DONOR_ID`, `CAMP_ID`, `EMPLOYEE_ID`, `HELATH_ISSUES`, `WEIGHT`, `LAST_DONATED`, `TIMES_DONATED`, `DONATED_DATE`, `QUANTITY`, `BLOOD_TYPE` FROM `donor_variable` NATURAL JOIN donor_static where donor_variable.DONOR_ID=donor_static.ID; ";
$res=mysqli_query($mysql_id,$query);
if($res->num_rows>0)
{
?>
<html>
<link rel="stylesheet" href="common.css">
<div class="nav">
<div class="topnav">
<a class="active" href="welcome.html">Home</a>
<a href="contact.html">Contact</a>
</div>
</div>
<style>body {
background-image:
url("images/12.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}</style>
<h1 align ="center">BLOOD DONATIONS</h1>
<body>
<table align ="center" border="3x" style ="color:white;background-color:black;opacity:0.7; line-height:30px;">
<tr>
<th colspan = "9"><h2>INVENTORY</h2></th>
</tr>
<tr>
<th>NAME </th>
<th>DONOR ID</th>
<th>CAMP ID</th>
<th>EMPLOYEE ID</th>
<th>HEALTH ISSUE</th>
<th>WEIGHT</th>
<th>LAST DONATED</th>
<th>TIMES DONATED</th>
<th>DONATED DATE</th>
<th>QUANTITY</th>
<th>BLOOD TYPE</th>
</tr>
<?php
while($rows=mysqli_fetch_assoc($res))
{
?>
<tr><td><?php echo $rows['name']; ?></td>
<td><?php echo $rows['DONOR_ID']; ?></td>
<td><?php echo $rows['CAMP_ID']; ?></td>
<td><?php echo $rows['EMPLOYEE_ID']; ?></td>
<td><?php echo $rows['HELATH_ISSUES']; ?></td>
<td><?php echo $rows['WEIGHT']; ?></td>
<td><?php echo $rows['LAST_DONATED']; ?></td>
<td><?php echo $rows['TIMES_DONATED']; ?></td>
<td><?php echo $rows['DONATED_DATE']; ?></td>
<td><?php echo $rows['QUANTITY']; ?></td>
<td><?php echo $rows['BLOOD_TYPE']; ?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>
<?php
}
else
echo "Empty set";
?>