-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathviewcity.php
91 lines (80 loc) · 2.06 KB
/
viewcity.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
<?php
session_start();
if(isset($_SESSION['login_user']))
{
$con=mysqli_connect("localhost","root","","mentalhealthsystem");
$query=mysqli_query($con,"Select * from cities");
?>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("https://images.pexels.com/photos/33834/landscape-shore-sunset-clouds.jpg?auto=compress&cs=tinysrgb&dpr=1&w=500");
background-size:cover;
}
#customers {
text-decoration: none;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
margin-top:100px;
width: 80%;
height: 80%;
}
#customers td, #customers th {
text-align: center;
border: 2px solid #ddd;
font-weight: bold;
padding: 8px;
padding-bottom: 20px;
}
#customers tr:nth-child(even){background-color: #f2f2f2;}
#customers tr:nth-child(odd) {background-color: #DACDCA;}
#customers th {
padding-top: 15px;
padding-bottom: 22px;
text-align: center;
background-color: #F3B8A1 ;
color: white;
}
#customer td{
text-decoration: none;
}
</style>
<title></title>
</head>
<body>
<table id="customers" width="500" border="1" cellpadding="10" cellspacing="0" align="center">
<tr>
<td colspan ="2" align="left">Welcome:<?php echo $_SESSION['login_user'];?></td>
<td colspan="2" align="right"> <a href="index.html">Logout</a>
</td>
</tr>
<tr>
<th>Serial No</th>
<th>City Name</th>
<th>Doctors</th>
</tr>
<?php
$sr=1;
while($fetchdata=mysqli_fetch_assoc($query))
{
?>
<tr>
<td><?php echo $sr;?></td>
<td><?php echo $fetchdata['City'];?></td>
<td>
<a href="viewdoc.php?cid=<?php echo $fetchdata['SNo'];?>">View</a>
</td>
</tr>
<?php $sr++;}?>
</table>
</body>
</html>
<?php
}
else
{
header('location:userlogin.html');
}
?>