-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
264 lines (234 loc) · 10.2 KB
/
profile.php
File metadata and controls
264 lines (234 loc) · 10.2 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['bbdmsdid'] == 0)) {
header('location:logout.php');
} else {
if (isset($_POST['update'])) {
$uid = $_SESSION['bbdmsdid'];
$name = $_POST['fullname'];
$mno = $_POST['mobileno'];
$emailid = $_POST['emailid'];
$age = $_POST['age'];
$weight = $_POST['weight'];
$sugerlevels = $_POST['sugerlevels'];
$bodytemprature = $_POST['bodytemprature'];
$anydisease = $_POST['anydisease'];
$pulserate = $_POST['pulserate'];
$bloodpressure = $_POST['bloodpressure'];
$hemoglobin = $_POST['hemoglobin'];
$gender = $_POST['gender'];
$bloodgroup = $_POST['bloodgroup'];
$address = $_POST['address'];
$message = $_POST['message'];
$sql = "update tblblooddonars set FullName=:name,MobileNumber=:mno, Age=:age,Weight=:weight,Sugerlevels=:sugerlevels,Bodytemprature=:bodytemprature,Anydisease=:anydisease,Pulserate=:pulserate,Bloodpressure=:bloodpressure,Hemoglobin=:hemoglobin,Gender=:gender,BloodGroup=:bloodgroup,Address=:address,Message=:message where id=:uid";
$query = $dbh->prepare($sql);
$query->bindParam(':name', $name, PDO::PARAM_STR);
$query->bindParam(':mno', $mno, PDO::PARAM_STR);
$query->bindParam(':age', $age, PDO::PARAM_STR);
$query->bindParam(':weight', $weight, PDO::PARAM_STR);
$query->bindParam(':sugerlevels', $sugerlevels, PDO::PARAM_STR);
$query->bindParam(':bodytemprature', $bodytemprature, PDO::PARAM_STR);
$query->bindParam(':anydisease', $anydisease, PDO::PARAM_STR);
$query->bindParam(':pulserate', $pulserate, PDO::PARAM_STR);
$query->bindParam(':bloodpressure', $bloodpressure, PDO::PARAM_STR);
$query->bindParam(':hemoglobin', $hemoglobin, PDO::PARAM_STR);
$query->bindParam(':gender', $gender, PDO::PARAM_STR);
$query->bindParam(':bloodgroup', $bloodgroup, PDO::PARAM_STR);
$query->bindParam(':address', $address, PDO::PARAM_STR);
$query->bindParam(':message', $message, PDO::PARAM_STR);
$query->bindParam(':uid', $uid, PDO::PARAM_STR);
$query->execute();
echo '<script>alert("Profile has been updated")</script>';
}
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Blood Bank Donar Management System !! Donor Profile</title>
<script>
addEventListener("load", function() {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->
<!-- Custom-Files -->
<link rel="stylesheet" href="css/bootstrap.css">
<!-- Bootstrap-Core-CSS -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<!-- Style-CSS -->
<link rel="stylesheet" href="css/fontawesome-all.css">
<!-- Font-Awesome-Icons-CSS -->
<!-- //Custom-Files -->
<!-- Web-Fonts -->
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese" rel="stylesheet">
<!-- //Web-Fonts -->
</head>
<body>
<?php include('includes/header.php'); ?>
<!-- banner 2 -->
<div class="inner-banner-w3ls">
<div class="container">
</div>
<!-- //banner 2 -->
</div>
<!-- page details -->
<div class="breadcrumb-agile">
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">Donor Profile</li>
</ol>
</div>
</div>
<!-- //page details -->
<!-- contact -->
<div class="appointment py-5">
<div class="py-xl-5 py-lg-3">
<div class="w3ls-titles text-center mb-5">
<h3 class="title">Donor Profile</h3>
<span>
<i class="fas fa-user-md"></i>
</span>
</div>
<div class="d-flex">
<div class="appoint-img">
</div>
<div class="contact-right-w3l appoint-form">
<h5 class="title-w3 text-center mb-5">Detail of Your profile</h5>
<form action="#" method="post">
<?php
$uid = $_SESSION['bbdmsdid'];
$sql = "SELECT * from tblblooddonars where id=:uid";
$query = $dbh->prepare($sql);
$query->bindParam(':uid', $uid, PDO::PARAM_STR);
$query->execute();
$results = $query->fetchAll(PDO::FETCH_OBJ);
$cnt = 1;
if ($query->rowCount() > 0) {
foreach ($results as $row) { ?>
<div class="form-group">
<label for="recipient-name" class="col-form-label">Full Name</label>
<input type="text" class="form-control" name="fullname" id="fullname" value="<?php echo $row->FullName; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Mobile Number</label>
<input type="text" class="form-control" name="mobileno" id="mobileno" required="true" maxlength="10" pattern="[0-9]+" value="<?php echo $row->MobileNumber; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Email Id <span style="color:red; font-size:10px;">(Can't be Change)</span></label>
<input type="email" name="emailid" class="form-control" value="<?php echo $row->EmailId; ?>" readonly>
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Age</label>
<input type="text" class="form-control" name="age" id="age" required="" value="<?php echo $row->Age; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Weight</label>
<input type="text" class="form-control" name="weight" id="weight" required="" value="<?php echo $row->Weight; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Suger Level</label>
<input type="text" class="form-control" name="sugerlevels" id="sugerlevels" required="" value="<?php echo $row->Sugerlevels; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Body Temprature</label>
<input type="text" class="form-control" name="bodytemprature" id="bodytemprature" required="" value="<?php echo $row->Bodytemprature; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Any Disease (specify)</label>
<input type="text" class="form-control" name="anydisease" id="anydisease" required="" value="<?php echo $row->Anydisease; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Pulse Rate</label>
<input type="text" class="form-control" name="pulserate" id="pulserate" required="" value="<?php echo $row->Pulserate; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Blood Pressure</label>
<input type="text" class="form-control" name="bloodpressure" id="bloodpressure" required="" value="<?php echo $row->Bloodpressure; ?>">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Hemoglobin</label>
<input type="text" class="form-control" name="hemoglobin" id="hemoglobin" required="" value="<?php echo $row->Hemoglobin; ?>">
</div>
<div class="form-group">
<label for="datepicker" class="col-form-label">Gender</label>
<select required="" class="form-control" name="gender">
<option value="<?php echo $row->Gender; ?>"><?php echo $row->Gender; ?></option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Transgender">Female</option>
</select>
</div>
<div class="form-group">
<label for="datepicker" class="col-form-label">Blood Group</label>
<select name="bloodgroup" class="form-control" required>
<option value="<?php echo $row->BloodGroup; ?>"><?php echo $row->BloodGroup; ?></option>
<?php $sql = "SELECT * from tblbloodgroup ";
$query = $dbh->prepare($sql);
$query->execute();
$results = $query->fetchAll(PDO::FETCH_OBJ);
$cnt = 1;
if ($query->rowCount() > 0) {
foreach ($results as $result) { ?>
<option value="<?php echo htmlentities($result->BloodGroup); ?>"><?php echo htmlentities($result->BloodGroup); ?></option>
<?php }
} ?>
</select>
</div>
<div class="form-group">
<label for="datepicker" class="col-form-label">Address</label>
<input type="text" class="form-control" name="address" id="address" required="true" value="<?php echo $row->Address; ?>">
</div>
<div class="form-group">
<label for="datepicker" class="col-form-label">Message</label>
<textarea class="form-control" name="message" required><?php echo $row->Message; ?></textarea>
</div>
<?php $cnt = $cnt + 1;
}
} ?>
<input type="submit" value="Update" name="update" class="btn_apt">
</form>
</div>
<div class="clerafix"></div>
</div>
</div>
</div>
<!-- //contact -->
<?php include('includes/footer.php'); ?>
<!-- Js files -->
<!-- JavaScript -->
<script src="js/jquery-2.2.3.min.js"></script>
<!-- Default-JavaScript-File -->
<!--start-date-piker-->
<link rel="stylesheet" href="css/jquery-ui.css" />
<script src="js/jquery-ui.js"></script>
<script>
$(function() {
$("#datepicker,#datepicker1").datepicker();
});
</script>
<!-- //End-date-piker -->
<!-- fixed navigation -->
<script src="js/fixed-nav.js"></script>
<!-- //fixed navigation -->
<!-- smooth scrolling -->
<script src="js/SmoothScroll.min.js"></script>
<!-- move-top -->
<script src="js/move-top.js"></script>
<!-- easing -->
<script src="js/easing.js"></script>
<!-- necessary snippets for few javascript files -->
<script src="js/medic.js"></script>
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
<!-- //Js files -->
</body>
</html><?php } ?>