-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
122 lines (90 loc) · 2.68 KB
/
main.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Afya Blood Donation</title>
</head>
<body>
<!-- navbar -->
<?php include('includes/navbarin.php')?>
<?php include('includes/conn.php') ?>
<!----->
<!----->
<?php
session_start();
?>
<!----->
<div class="user">
<div class="left">
<h3>profile</h3>
<!-- logged in user information -->
<?php if (isset($_SESSION['username'])) : ?>
<p><img class="profile" src= "/image/drop.png" ><br>
<strong>Welcome <?php echo $_SESSION['username']; ?></strong></p>
<strong><?php echo $_SESSION['password']; ?></strong></p>
<?php endif ?>
<p>One point of blood can save Three live</p>
<div>
<h3>
Recommended Diet
</h3>
<h4>Before Donating</h4>
<ul>
<li>Meats,likebeef, lamb, ham, pork, veal, and dried beef.</li>
<li>Poultry, such as chicken and turkey.</li>
<li> and shellfish, like tuna, shrimp, clams, haddock, and mackerel.</li>
<li>Organs, such as liver.</li>
<li>Eggs</li>
</ul>
<h4>After Donation</h4>
<ul>
<li>
Eat Iron-rich foods
</li>
<li>
Eat foods rich in Vitamin C
</li>
<li>
Drink plenty of water
</li>
</ul>
</div>
</div>
<div class="right">
<div>
<!-- try -->
<?php
$id = $_SESSION['username'];
$sql = "SELECT * FROM users WHERE username='$id'";
$result = $db->query($sql);
// LOOP TILL END OF DATA
while($row=$result->fetch_assoc())
$home = $row['county'];
{?>
<a href="../donate/donate.php?id=<?=$home?>" >
<img src="../image/donate.png" height="150px"><br>
Donate now</a></a>
<?php
}
?>
<!-- end try -->
</div>
<div>
<a href="../donate/appointments.php">
<img src="../image/calender.jpg" height="150px"><br>
My Appointments</a>
</div>
<div>
<a href="account.php">
<img src="../image/account.png" height="150px"><br>
Account
</a>
</div>
</div>
</div>
<?php include('includes/footer.php') ?>
</body>
</html>