-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewDoctor.php
More file actions
51 lines (40 loc) · 1.05 KB
/
Copy pathviewDoctor.php
File metadata and controls
51 lines (40 loc) · 1.05 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
<!-- Made By Kratu -->
<?php
/*create a coonection with the database*/
$con = mysqli_connect("localhost","root","") or die("Error Occures") ;
mysqli_select_db($con, "hospital_management_system") or die("Error Occures");
$sql = "SELECT * FROM employee";
$records = mysqli_query($con, $sql);
?>
<html>
<head>
<title>View Details of a Doctor</title>
</head>
<body>
<h1 style="font-size:45px;text-align:center">View Doctor/Consultant Details</h1>
<table width="600" cellpadding="1" border="1" cellspacing="1" align="center">
<tr>
<th>Employee ID</th>
<th>Employee Name</th>
<th>Gender</th>
<th>DOB</th>
<th>Salary</th>
</tr>
<?php
if($records){
while($row = mysqli_fetch_assoc($records)){
echo "<tr>";
echo "<td>".$row['eID']."</td>";
echo "<td>".$row['eName']."</td>";
echo "<td>".$row['gender']."</td>";
echo "<td>".$row['DOB']."</td>";
echo "<td>".$row['salary']."</td>";
echo "</tr>";
}
echo "<table>";
mysqli_close($con);
}
?>
</table>
</body>
</html>