-
Notifications
You must be signed in to change notification settings - Fork 1
/
query.php
124 lines (105 loc) · 3.52 KB
/
query.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
<?PHP
include "dbconnection.php";
$sel1 = "SELECT * from rooms ";
$rs_result = mysqli_query($dbconnection,$sel1);
$r1 = mysqli_num_rows($rs_result);
session_start();
$_SESSION['room_id'] = mysqli_insert_id($dbconnection);
$sel1 = "SELECT * from suite";
$result = mysqli_query($dbconnection,$sel1);
$r2 = mysqli_num_rows($result);
session_start();
$_SESSION['s_id'] = mysqli_insert_id($dbconnection);
include "header.php";
?>
<body>
<!--==============================header=================================-->
<header>
<div class="container_12">
<div class="grid_12">
<div class="menu_block">
<nav class="horizontal-nav full-width horizontalNav-notprocessed">
<ul class="sf-menu">
<li><a href="index.php">ABOUT</a></li>
<li><a href="tours.php">HOT TOURS</a></li>
<li><a href="special.php">SPECIAL OFFERS</a></li>
<li><a href="rooms.php">ROOMS</a></li>
<li><a href="contact.php">CONTACTS</a></li>
</ul>
</nav>
<div class="clear"></div>
</div>
</div>
</div>
</header>
<!--==============================Content=================================-->
<div class="content">
<div class="container_12">
<form method="post">
<h3>Room Details</h3>
<table>
<tr>
<th>Room No</th>
<th>Image</th>
<th>Type</th>
<th>Capacity</th>
<th>Advance</th>
<th>Rent</th>
<th>Return Amount</th>
</tr>
<?php
while($row = mysqli_fetch_array($rs_result,MYSQL_ASSOC))
{
session_start();
$_SESSION['room_id'] = mysqli_insert_id($dbconnection);
?>
<tr>
<td><?php echo $row['room_no'];?></td>
<td><a href="login.php?roomid=<?php echo $row['room_no'];?>"><img class="img1" src="images/<?php echo $row[room_image]; ?>" width="120" height="50" /></a></td>
<td><?php echo $row['type']; ?></td>
<td><?php echo $row['capacity']; ?></td>
<td><?php echo $row['advance']; ?></td>
<td><?php echo $row['rent']; ?></td>
<td><?php echo $row['return_amt']; ?></td>
</tr>
<?php
} ?>
</tbody>
</table>
</form>
<form method="post">
<h3>Suite Details</h3>
<table>
<tr>
<th>Suite No</th>
<th>Image</th>
<th>Type</th>
<th>Capacity</th>
<th>Advance</th>
<th>Rent</th>
<th>Return Amount</th>
</tr>
<?php
while($row = mysqli_fetch_array($result,MYSQL_ASSOC))
{
session_start();
$_SESSION['s_id'] = mysqli_insert_id($dbconnection);
?>
<tr>
<td><?php echo $row['no'];?></td>
<td><a href="login.php"><img class="img1" src="images/<?php echo $row[image]; ?>" width="120" height="50" /></a></td>
<td><?php echo $row['type']; ?></td>
<td><?php echo $row['capacity']; ?></td>
<td><?php echo $row['advance']; ?></td>
<td><?php echo $row['rent']; ?></td>
<td><?php echo $row['return_amt']; ?></td>
</tr>
<?php
} ?>
</tbody>
</table>
</form>
</div>
</div>
<!--==============================footer=================================-->
<?php include 'footer.php';?>