-
Notifications
You must be signed in to change notification settings - Fork 4
/
doctor-profile.php
183 lines (124 loc) · 5.17 KB
/
doctor-profile.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
<head>
<title>Doctor Dashboard | Healing Infirmary</title>
<link rel="icon" href="assets/img/mlogo.png">
</head>
<?php
session_start();
include_once('include/conn.php');
include_once('sql.php');
$_SESSION['email'];
$eamil=$_SESSION['email'];
$result = mysqli_query($conn,"SELECT * FROM doctor_reg Where email='$eamil'");
if (mysqli_num_rows($result) > 0) {
$i=0;
$row = mysqli_fetch_array($result);
}
else{
echo "No result found";
}
if(strlen($_SESSION['email'])==0)
{
header('location:login.php');
}
else{
$message="";
if(isset($dbh)){
//connection check
if (isset($_post['submit'])) {
$result1 = mysqli_query($conn,"UPDATE doctor_reg SET name = '$name', title= '$title' , specialist='$specialist', bmdc='$bmdc', mobile='$mobile', address='$address' Where email='$eamil'");
$name = $_POST['name'];
$title = $_POST['title'];
$specialist = $_POST['specialist'];
$bmdc = $_POST['bmdc'];
$mobile = $_POST['mobile'];
$email = $_POST['email'];
$address = $_POST['address'];
if($result1->execute()){
$message="Insert Row Success";
header("Location:doctor-profile.php");
}
else{
$message="";
}
}
}
}
include_once('include/header.php');
include_once('include/Doctor-sidebar.php');
?>
<main class="app-content">
<div class="app-title">
<div>
<h1><i class="fa fa-user-md"></i> Doctor Profile</h1>
</div>
<ul class="app-breadcrumb breadcrumb">
<li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
<li class="breadcrumb-item">Doctor Dashbord</li>
</ul>
</div>
<div class="row">
<div class="col-md-6 m-auto">
<div class="tile">
<h3 class="tile-title"> MY PROFILE </h3>
<div class="tile-body">
<form action="doctor-profile.php" method="post" class="form-horizontal" enctype="multipart/form-data">
<div class="form-group" align="center" >
<img src="<?php echo $row["image"]; ?>" alt="User Image" style="height: 100px; width: 100px; border-radius: 50%; ">
</div>
<div class="form-group">
<label class="control-label text-dark" >TITLE: <span class="text-danger">*</span></label>
<select id="title" name="title" class="form-control">
<option value=""><?php echo $row["title"]; ?></option>
<option value="Dr">Dr.</option>
<option value="Prof">Prof. Dr.</option>
<option value="Assoc">Assoc. Prof. Dr.</option>
<option value="Asst">Asst. Prof. Dr.</option>
</select>
</div>
<div>
<label class="control-label">Doctor Name:<span class="text-danger">*</span></label>
<input type="text" name="name" id="" class="form-control" value="<?php echo $row["name"]; ?>" autocomplete="off">
</div>
<div>
<label class="control-label">Doctor Email:<span class="text-danger">*</span></label>
<input type="email" name="dmail" id="" class="form-control" value="<?php echo $row["email"]; ?>"autocomplete="off">
</div>
<div class="form-group">
<label class="control-label text-dark" > SPECIALIST: <span class="text-danger">*</span></label>
<select id="specialist" name="specialist" class="form-control">
<option value="database"><?php echo $row['specialist']; ?></option>
<option value="Allergists">Allergists/Immunologists</option>
<option value="Anesthesiologists">Anesthesiologists</option>
<option value="Cardiologists">Cardiologists</option>
<option value="Medicine ">Medicine Specialists</option>
<option value="Dermatologists ">Dermatologists </option>
<option value="Hematologists ">Hematologists </option>
<option value="Neurologists ">Neurologists </option>
<option value="Sleep Medicine Specialists ">Sleep Medicine Specialists </option>
</select>
</div>
<div class="form-group">
<label class="control-label">BMDC No:<span class="text-danger">*</span></label>
<input type="text" name="bmdc" id="" class="form-control" value="<?php echo $row["bmdc"]; ?>"autocomplete="off">
<span id='message'></span>
</div>
<div class="form-group">
<label class="control-label">Mobile No:<span class="text-danger">*</span></label>
<input type="text" name="mobile" id="" class="form-control" value="<?php echo $row["mobile"]; ?>"autocomplete="off">
<span id='message'></span>
</div>
<div class="form-group">
<label class="control-label">Address :<span class="text-danger">*</span></label>
<input type="text" name="mobile" id="" class="form-control" value="<?php echo $row["address"]; ?>"autocomplete="off">
<span id='message'></span>
</div>
<div class="form-group btn-container">
<button class="btn btn-primary btn-block" type="submit" name="submit" value="submit"><i class="fa fa-sign-in fa-lg fa-fw"></i>Edit Profile</button>
</div>
</form>
</div>
</div>
</div>
<?php
include_once('include/footer.php');
?>