-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatientFullReportfordoc.php
175 lines (145 loc) · 4.18 KB
/
patientFullReportfordoc.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
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
input[type=text], input[type=password],input[type=number] {
width: 100%;
padding: 15px;
margin: 5px 0 22px 0;
display: inline-block;
border: none;
background: #f1f1f1;
}
input[type=text]:focus, input[type=password]:focus,input[type=number]:focus{
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity:1;
}
/* Extra styles for the cancel button */
.cancelbtn {
padding: 14px 20px;
background-color: #f44336;
}
/* Float cancel and signup buttons and add an equal width */
.cancelbtn, .signupbtn {
float: left;
width: 50%;
}
/* Add padding to container elements */
.container {
padding: 16px;
margin-top: 50px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.cancelbtn, .signupbtn {
width: 100%;
}
}
</style>
</head>
<body>
<?php
include 'DoctorHeader.php';
?>
<form action="" method="post" style="border:1px solid #ccc">
<?php
echo "<br><br><br>";
echo "<br><br><br>";
$host = 'localhost';
$user = 'root';
$pass = '';
$dbname = 'hospitalmanagement';
$conn = mysqli_connect($host, $user, $pass, $dbname);
if(isset($_GET['page'])){
$page=$_GET['page'];
}else{
$page=1;
}
if($page==''||$page==1){
$page1=0;
}else{
$page1=($page*12)-12;
}
echo "ID: ";
$sql1 = "SELECT `ID` FROM `patientappointment`";
if($result1 = mysqli_query($conn, $sql1)){
if(mysqli_num_rows($result1) > 0){
echo "<select name=".'ID'.">";
echo "<option value=''></option>";
while($row1 = mysqli_fetch_array($result1)){
echo "<option value=".$row1['ID'].">".$row1['ID']."</option>";
}
echo "</select>";
mysqli_free_result($result1);
} else{
echo "No records matching your query were found.";
}
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($conn);
}
echo "<br><br><br>";
mysqli_close($conn);
?>
<button type="submit" name="submit" class="signupbtn">Check</button>
<br><br><br>
</form>
<?php
if(isset($_POST["submit"])){
$host = 'localhost';
$user = 'root';
$pass = '';
$dbname = 'hospitalmanagement';
$conn = mysqli_connect($host, $user, $pass, $dbname);
$ID=$_POST["ID"];
$sql = "SELECT * FROM `reports` WHERE `PatientID`=$ID";
if($result1 = mysqli_query($conn, $sql)){
if(mysqli_num_rows($result1) > 0){
while($row1 = mysqli_fetch_array($result1)){
echo "<p style='text-align:center;font-family: Comic Sans MS;'>Name:".$row1['PatientName']."</p>";
echo "<p style='text-align:center;font-family: Comic Sans MS;'>ID:".$row1['PatientID']."</p>";
echo "<p style='text-align:center;font-family: Comic Sans MS;'>Report:".$row1['Report']."</p>";
echo "<p style='text-align:center;font-family: Comic Sans MS;'>Doctor Name:".$row1['DoctorName']."</p>";
echo "<p style='text-align:center;font-family: Comic Sans MS;'>Referred Doctor:".$row1['ReferredDoctor']."</p>";
echo "<p style='text-align:center;font-family: Comic Sans MS;'>medicines:".$row1['medicines']."</p>";
echo "<br><br><br>";
}
mysqli_free_result($result1);
} else{
echo "No records matching your query were found.";
}
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($conn);
}
echo "<br><br><br>";
}
?>
<?php
include 'footer.php';
?>
</body>
</html>