-
Notifications
You must be signed in to change notification settings - Fork 0
/
my-profile-adr.php
192 lines (147 loc) · 6.36 KB
/
my-profile-adr.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
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
<?php require_once("header.php");
$cookie_name="bquidns";
if(isset($_COOKIE[$cookie_name])) {
$logincheck = "SELECT * FROM Users WHERE authID='$_COOKIE[$cookie_name]'";
$runlogCheck= mysqli_query($connect,$logincheck);
$logcheckCount= mysqli_num_rows( $runlogCheck);
if($logcheckCount==1){
$sql = "SELECT * FROM Users WHERE authID='$_COOKIE[$cookie_name]'";
$status= mysqli_query($connect,$sql);
if($status==true)
{
while($getRow = mysqli_fetch_array($status))
{
$role = $getRow['role'];
$fname=$getRow['Fname'];
$lname=$getRow['Lname'];
$email=$getRow['email'];
$phone=$getRow['phone'];
$uid=$getRow['uid'];
if($role==='doner')
{
// header("Location: index.php?alrd");
}
}
}
}}else{
header("Location: login.php?nsc");
}
require_once("profile-menu.php");
?>
<!-- Main Page -->
<div class="container-fluid">
<div class="container p-3">
<div class="row">
<div class="col-lg-8 col-md-10 col-center">
<form class="shadow" action="bdoner-helper.php" method="post" class="bg-light" enctype="multipart/form-data">
<h2 class="pt-3 text-center">Add Doner Friend</h2>
<p class="text-center pb-3">Please fill the following information to Complete profile and become a dooner.</p>
<hr>
<div class="container">
<div class="row">
<div class="col-md-8">
<label for="fullname"><b>Full Name</b></label>
<input type="text" name="fullname" placeholder="Full Name" required>
</div>
<div class="col-md-4">
<label for="bgroup"><b>Blood Group </b></label>
<select name="bgroup" id="bgroup">
<option value="bnone">Select Blood Group</option>
<option value="A+">A+</option>
<option value="B+">B+</option>
<option value="AB+">AB+</option>
<option value="O+">O+</option>
<option value="A-">A-</option>
<option value="B-">B-</option>
<option value="AB-">AB-</option>
<option value="O-">O-</option>
</select>
<?php if(isset($_REQUEST['bnone'])){
?>
<span class="text-danger"><?php echo "Please Select Blood group"; ?></span>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label for="email"><b>Email for Contact </b></label>
<input type="email" placeholder="Enter Email Address" name="email" required>
</div>
<div class="col-md-6">
<label for="phone"><b>Mobile Number for Contact</b></label>
<input type="tel" placeholder="+880 170 0000000" name="phone" required>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label for="dob"><b>Date of Birth</b></label>
<input type="date" placeholder="When Need Blood ?" name="dob" required>
</div>
<div class="col-md-6">
<label for="gender"><b>Gender</b></label>
<select name="gender">
<option value="gnone">Select Gender</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other's">Other's</option>
</select>
<?php if(isset($_REQUEST['gnone'])){
?>
<span class="text-danger"><?php echo "Please Select Gender !"; ?></span>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label for="profile"><b>Profile Picture</b></label>
<input type="file" placeholder="Select Profile Picture" name="profile" required>
</div>
<div class="col-md-6">
<label for="ability"><b>Avility</b></label>
<select name="ability" id="">
<option value="anone">Select Ability</option>
<option value="Available">Available</option>
<option value="Unavailable">Unavailable</option>
</select>
<?php if(isset($_REQUEST['anone'])){
?>
<span class="text-danger"><?php echo "Please Select Ability !"; ?></span>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-md-5">
<label for="addr"><b>Address</b></label>
<input type="text" placeholder="Address" name="addr" required>
</div>
<div class="col-md-4">
<label for="city"><b>City</b></label>
<input type="text" placeholder="City" name="city" required>
</div>
<div class="col-md-3">
<label for="zip"><b>ZIP CODE</b></label>
<input type="text" placeholder="ZIP" name="zip" required>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label for="fb"><b>Facebook profile url</b></label>
<input type="text" placeholder="https://fb.com/username" name="fb" >
</div>
<div class="col-md-6">
<label for="ld"><b>Last Donate</b></label>
<input type="date" name="ld" >
</div>
</div>
<label for="details"><b>About Dooner</b></label>
<textarea name="details" id="" cols="30" rows="5"></textarea>
<input type="hidden" name="uid" value="reffer">
<input type="hidden" name="reffer" value="<?php echo $uid?>">
<button class="btn bg-success font-weight-bold text-light" type="submit">Add Doner Friend</button>
</div>
</form>
</div>
</div>
</div>
</div>
<?php require_once("footer.php"); ?>