-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapprove_apointment.php
170 lines (106 loc) · 4.08 KB
/
approve_apointment.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
<head>
<title>Doctor Dashboard | Healing Infirmary</title>
<link rel="icon" href="assets/img/mlogo.png">
</head>
<!-- ================================================================= -->
<?php
session_start();
require_once('sql.php');
$_SESSION['email'];
$uamil=$_GET['id'];
$eamil=$_SESSION['email'];
//$umail=$_SESSION['umail'];
$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";
}
include_once('include/header.php');
include_once('include/Doctor-sidebar.php');
?>
<!-- ================================================================= -->
<?php
include('include/conn.php');
include_once('sql.php');
$dmail=$_SESSION['email'];
//$umail=$_SESSION['umail'];
//Flash Message
$message="";
if(isset($dbh)){
//connection check
if(isset($_POST['submit'])){
$stmt = $dbh->prepare("INSERT INTO `apporved_appointment`(`dmail`,`umail`,`date`,`text`,`time`) VALUES (:dmail, :umail, :date, :text, :time)");
//bindParam
//$stmt->bindParam(':date', $date);
$stmt->bindParam(':dmail', $dmail);
$stmt->bindParam(':umail', $umail);
$stmt->bindParam(':date', $date);
$stmt->bindParam(':text', $text);
$stmt->bindParam(':time', $time);
//$doc_type= $_POST['date'];
$dmail = $_POST['dmail'];
$umail = $_POST['umail'];
$text = $_POST['text'];
$date = $_POST['date'];
$time = $_POST['time'];
//This variable data has been assigned by us
if($stmt->execute()){
$message="Insert Row Success";
}
else{
$message="Insert Row Fail";
}
}
}
?>
<main class="app-content">
<div class="app-title">
<div>
<h1><i class="fa fa-dashboard"></i>Doctor Dashboard</h1>
</div>
<ul class="app-breadcrumb breadcrumb">
<li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
<li class="breadcrumb-item"><a href="#">Dashboard</a></li>
</ul>
</div>
<div class="row">
<div class="col-md-6 m-auto">
<div class="tile">
<h3 class="tile-title">Approve Appointment </h3>
<div class="tile-body">
<form action="approve_apointment.php" method="post" class="form-horizontal" enctype="multipart/form-data">
<label class="control-label">Doctor Email:<span class="text-danger">*</span></label>
<input type="email" name="dmail" id="" class="form-control" value="<?php echo $dmail; ?>" placeholder=" Doctor Email" autocomplete="off">
</div>
<div class="form-group">
<label class="control-label">User Email:<span class="text-danger">*</span></label>
<input type="email" name="umail" id="" class="form-control" value="<?php echo $uamil;?>"autocomplete="off">
<span id='message'></span>
</div>
<div class="form-group">
<label class="control-label"> DATE: <span class="text-danger">*</span></label>
<input type="date" id="date" name="date" rows="4" cols="50" class="form-control" placeholder="Write your message Here">
</div>
<div class="form-group">
<label class="control-label"> Time: <span class="text-danger">*</span></label>
<input type="time" id="time" name="time" rows="4" cols="50" class="form-control" placeholder="Write your message Here">
</div>
<div class="form-group">
<label class="control-label">Message: <span class="text-danger">*</span></label>
<input type="text" id="text" name="text" rows="4" cols="50" class="form-control" placeholder="Write your message Here">
</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>Sent Appointment</button>
</div>
</form>
</div>
</div>
</div>
</main>
<?php
include_once('include/footer.php');
include_once('include/Hfooter.php');
?>