-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathviewroom.php
60 lines (59 loc) · 1.4 KB
/
viewroom.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
<?php
include("header.php");
include("dbconnection.php");
if(isset($_GET[delid]))
{
$sql ="DELETE FROM room WHERE roomid='$_GET[delid]'";
$qsql=mysqli_query($con,$sql);
if(mysqli_affected_rows($con) == 1)
{
echo "<script>alert('room deleted successfully..');</script>";
}
}
?>
<div class="wrapper col2">
<div id="breadcrumb">
<ul>
<li class="first">View Room</li></ul>
</div>
</div>
<div class="wrapper col4">
<div id="container">
<h1>View Room details record</h1>
<table width="200" border="3">
<tbody>
<tr>
<td width="21%">Room Type</td>
<td width="21%">Room Number</td>
<td width="30%">Number of beds</td>
<td width="30%">Room Tariff</td>
<td width="14%">Status</td>
<td width="14%">Action</td>
</tr>
<?php
$sql ="SELECT * FROM room";
$qsql = mysqli_query($con,$sql);
while($rs = mysqli_fetch_array($qsql))
{
echo "<tr>
<td> $rs[roomtype]</td>
<td> $rs[roomno]</td>
<td> $rs[noofbeds]</td>
<td> $rs[room_tariff]</td>
<td> $rs[status]</td>
<td> <a href='room.php?editid=$rs[roomid]'>Edit</a> | <a href='viewroom.php?delid=$rs[roomid]'>Delete</a> </td>
</tr>";
}
?>
</tbody>
</table>
<p> </p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<?php
include("footer.php");
?>