-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate_service.php
47 lines (40 loc) · 1.16 KB
/
update_service.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
<?php
$id=$_GET['id'];
$sql=mysqli_query($con,"select * from rooms where room_id='$id'");
$res=mysqli_fetch_assoc($sql);
extract($_REQUEST);
if(isset($update))
{
mysqli_query($con,"update rooms set room_no='$rno',type='$type',price='$price',details='$details' where room_id='$id' ");
header('location:dashboard.php?option=rooms');
}
?>
<form method="post" enctype="multipart/form-data">
<table class="table table-bordered">
<tr>
<th>Room No</th>
<td><input type="text" name="rno" value="<?php echo $res['room_no']; ?>" class="form-control"/>
</td>
</tr>
<tr>
<th>Service Type</th>
<td><input type="text" name="type" value="<?php echo $res['type']; ?>" class="form-control"/>
</td>
</tr>
<tr>
<th>Price</th>
<td><input type="text" name="price" value="<?php echo $res['price']; ?>" class="form-control"/>
</td>
</tr>
<tr>
<th>Details</th>
<td><textarea name="details" class="form-control"><?php echo $res['details']; ?></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" class="btn btn-primary" value="Update Room Details" name="update"/>
</td>
</tr>
</table>
</form>