-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdoctor_data.php
80 lines (61 loc) · 1.87 KB
/
doctor_data.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
<!DOCTYPE html>
<html>
<head>
<title> Doctor Data</title>
<style>
div{
margin-left: 3%;
margin-right: 10%;
margin-top: 3%;
background-color: whitesmoke;
height: 750px;
padding-top: 1%;
border-radius: 5%;
}
table, th, td{
border: 1Px solid black;
border-collapse: collapse;
text-align: center;
background-image: linear-gradient(to bottom right, #0052b0, #b340b3);
}
table{
margin-left: 10%;
font-size: x-large;
}
</style>
</head>
<body>
<div>
<h2 style="color: blue;text-align: center">DOCTOR DATA</h2>
<?php
if(isset($_POST['display'])){
$myConnection = mysqli_connect("localhost", "root", "", "doctor");
$read_query = "SELECT NAME,EMAIL,MOBILE_NUMBER,STATE,DISTRICT,AREA FROM doctor_data";
$data = mysqli_query($myConnection, $read_query);
if(mysqli_num_rows($data)>0){
echo "<table style= border: 1ps solid black>
<tr>
<th>DOCTOR NAME</th>
<th>EMAIL</th>
<th>CONTACT</th>
<th>STATE</th>
<th>DISTRICT</th>
<th>AREA</th>";
while($row = mysqli_fetch_array($data)){
echo"<tr>";
echo "<td>".$row['NAME']."</td>";
echo "<td>".$row['EMAIL']."</td>";
echo "<td>".$row['MOBILE_NUMBER']."</td>";
echo "<td>".$row['STATE']."</td>";
echo "<td>".$row['DISTRICT']."</td>";
echo "<td>".$row['AREA']."</td>";
echo "</tr>";
}
} else {
echo "Record Not found";
}
}
?>
</div>
</body>
</html>