-
Notifications
You must be signed in to change notification settings - Fork 1
/
room-display.php
executable file
·82 lines (64 loc) · 2.02 KB
/
room-display.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
<?php
/**
* Created by PhpStorm.
* User: prajjwal
* Date: 2/13/18
* Time: 12:09 PM
*/
session_start();
include ('admin/dbcon.php');
if(!isset($_SESSION['uid']) || !isset($_SESSION['user'])){
header('location:guest-login.php');
}
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>Room Display</title>
<link href="css/menu.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<?php include ('headeruser.php');?>
<div class="title">
<h2>Welcome To Our Resort</h2>
</div>
<hr>
<?php
$id= $_SESSION['uid'] ;
$query="SELECT * FROM `roomupload`";
$run=mysqli_query($con,$query);
if(mysqli_num_rows($run)>0){
while($data=mysqli_fetch_assoc($run)){
?>
<div class="dis">
<div class="form">
<table width="70%" >
<tr>
<td colspan="3" rowspan="6"><img align="center" src="admin/roomimage/<?php echo $data['image'];?>" height="300px" width="550px"/></td>
</tr>
<tr>
<th>Room No:</th>
<td><?php echo $data['room_no'];?></td>
</tr>
<tr>
<th>Price per night:</th>
<td><?php echo $data['price'];?></td>
</tr>
<tr>
<th>Type:</th>
<td><?php echo $data['type'];?></td>
</tr>
<tr>
<th>Status:</th>
<td><?php echo $data['status'];?></td>
</tr>
<td colspan="2" align="center"><a href="room-booked.php?id=<?php echo $data['id'];?>"><button>Book Now</button></a></td>
</table>
</div>
<hr>
</div>
<?php } } ?>
<?php include ('footer.php');?>
</body>
</html>