-
Notifications
You must be signed in to change notification settings - Fork 1
/
bookroom.php
135 lines (124 loc) · 5.29 KB
/
bookroom.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
125
126
127
128
129
130
131
132
133
134
135
<?php
include ("dbconnection.php");
?>
<?php
$msg='';
$errormsg='';
if(isset($_POST["save"]))
{
include ("dbconnection.php");
$guest_name = $_POST['guest_name'];
$check_in = $_POST['check_in'];
$check_out = $_POST['check_out'];
$room_type = $_POST['type'];
$adult = $_POST['adult'];
$children = $_POST['children'];
$t_room = $_POST['t_room'];
$sql ="INSERT INTO booking(guest_name) values(' " . $guest_name . " ',' " . $check_in . " ',' " . $check_out . " ',' " . $type . " ',' " . $adult . " ',' " . $children . " ',' " . $t_room . " ')";
if (mysqli_query($dbconnection, $sql))
{
header("Location: payment.php");
}
else
{
$errormsg='<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Got some Error.</strong>
</div>';
}
}
$dbconnection->close();
include 'header.php';
?>
<body>
<!--==============================header=================================-->
<header>
<div class="container_12">
<div class="grid_12">
<div class="menu_block">
<?PHP
include 'menu.php';
?>
<div class="clear"></div>
</div>
</div>
</div>
</header>
<!--==============================Content=================================-->
<div class="content">
<div class="container_12">
<h3>BOOK YOUR STAY HERE</h3>
<div class="tab-pane active tab1">
<form class="form-horizontal" role="form" method="POST" action="payment.php">
<div class="form-group">
<label class="col-sm-2 control-label">Guest Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="guest_name">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Check In Date</label>
<div class="col-sm-10">
<input type="date" class="form-control" name="check_out" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Check Out Date</label>
<div class="col-sm-10">
<input type="date" name="check_in" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Room Type</label>
<div class="col-sm-10">
<select class="form-control" id="type" name="type">
<option value="DELUXE GUEST ROOM">DELUXE GUEST ROOM</option>
<option value="SUPERIOR GUEST ROOM">SUPERIOR GUEST ROOM</option>
<option value="CLUB LEVEL GUEST ROOM">CLUB LEVEL GUEST ROOM</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Adult</label>
<div class="col-sm-10">
<select class="form-control" name="adult">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Children</label>
<div class="col-sm-10">
<select class="form-control" name="children">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">No Of Rooms</label>
<div class="col-sm-10">
<select class="form-control" name="t_room">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<button class="btn btn-primary" name="save" style="float: right;margin-right: 20px;">SAVE</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!--==============================footer=================================-->
<?php include 'footer.php';?>