-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.php
92 lines (59 loc) · 2.15 KB
/
account.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
<!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>
<!-- na <?php include('includes/navbarin.php')?>
<?php include('includes/mininav.php') ?>
<!----->
<?php
session_start();
include('includes/conn.php') ?>
<!----->
<div class="user">
<div class="left" style=" margin-left:30%; margin-right:30%">
<h3>profile</h3>
<!-- logged in user information -->
<?php if (isset($_SESSION['username'])) : ?>
<p><img class="profile" src= "/image/drop.png" ><br>
<strong>Hello <?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>
<h3>profile Details</h3>
<?php
$id = $_SESSION['username'];
$sql = "SELECT * FROM users WHERE username='$id'";
$result = $db->query($sql);
// LOOP TILL END OF DATA
while($rows=$result->fetch_assoc())
{
?>
<p> <strong>Full name : </strong><?php echo $rows['fullname'];?><br></p>
<p> <strong>Username : </strong><?php echo $rows['username'];?><br></p>
<p> <strong>Email : </strong><?php echo $rows['email'];?><br></p>
<p> <strong>Date of birth : </strong><?php echo $rows['dob'];?><br></p>
<p> <strong>County : </strong><?php echo $rows['county'];?><br></p>
<p> <strong>Gender : </strong><?php echo $rows['gender'];?><br></p>
<p> <strong>Eloodtype : </strong><?php echo $rows['bloodtype'];?><br></p>
<p> <strong>Weight : </strong><?php echo $rows['weight'];?><br></p>
<p> <strong>Height: </strong><?php echo $rows['height'];?><br></p>
<br>
<br>
<br>
<br>
<div class = bodylink><a href="update.php" >Edit Profile</a></div>
<?php
}
?>
</div>
</div>
</div>
<?php include('includes/footer.php') ?>
</body>
</html>