-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPatientStatusUpdate.php
More file actions
185 lines (126 loc) · 3.49 KB
/
PatientStatusUpdate.php
File metadata and controls
185 lines (126 loc) · 3.49 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
<?php include 'connection.php';?>
<?php
$id=$_GET['i'];
//echo $id;
//echo $dt;
$Patient=mysqli_query($con,"select * from listofappointment where pid='$id' ");
$data=mysqli_fetch_array($Patient)
?>
<?php
session_start();
if(isset($_SESSION['email']))
{
//echo $_SESSION['email'];
?>
<style type="text/css">
html,body{
height: 100%;
}
body{
margin: 0;
padding: 0;
}
.bg-all {
background: #FFDA1F;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Appointment View & Add</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="bg-all">
<div class="culd"></div>
<div class="culd"></div>
<div class="culd"></div>
<div class="culd"></div>
<div class="culd"></div>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Patient Status</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<br>
<div class="card">
<div class="card-body bg-primary">
Patient Status
</div>
</div>
<br>
<div class="card">
<div class="card-body">
<form action="" method="post" autocomplete="off" >
<div class="form-group">
<label for="id">Id</label>
<input type="text" class="form-control" name="pid" value="<?php echo $data[0];?>" readonly= >
<br>
<label for="name">Name</label>
<input type="text" class="form-control" name="pname" value="<?php echo $data[1];?>">
<br>
<label for="PType">PType</label>
<input type="text" class="form-control" name="pty" value="<?php echo $data[2];?>">
<br>
<label for="age">Age</label>
<input type="text" class="form-control" name="page" value="<?php echo $data[4];?>">
<br>
<label>PStatus</label>
<input type="text" class="form-control" name="pst" placeholder="Patient Status" required="">
<div class="card-footer">
<input type="submit" class="btn btn-success" value="Submit" name="dn">
</div>
</div>
</form>
</div>
</div>
</div>
</body>
</div>
<?php
}
else
{
header("location:Login.php")
?>
<?php
}
?>
</html>
<?php
if(isset($_POST['dn']))
{
$id=$_POST['pid'];
$pnm=$_POST['pname'];
$pty=$_POST['pty'];
$page=$_POST['page'];
$pstatus=$_POST['pst'];
$patientstatus=mysqli_query($con,"UPDATE listofappointment SET Name = '$pnm',PType='$pty',Age='$page',PStatus='$pstatus' WHERE pid = '$id'");
if($patientstatus)
{
echo " <div class='alert alert-success'>
<strong>Success!</strong> Patient Data Update.
</div>";
}
else {
echo"<div class='alert alert-danger'>
<strong>Fail</strong>Not Update Patient Data.
</div>";
}
}