-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreservation.php
More file actions
173 lines (170 loc) · 4.42 KB
/
reservation.php
File metadata and controls
173 lines (170 loc) · 4.42 KB
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?php
session_start();
?><html>
<head>
<script language=javascript src="function.js">
</script>
<script language=javascript>
function checkout()
{
var i=0;
for(x=0;x<document.f1.elements.length;x++)
{
if(document.f1.elements[x].value=="")
{
f1.txtname.focus();
alert("Pls Enter All Value");
i=1;
break;
}
}
if(i==0)
{
f1.method="POST";
f1.action="addres.php";
f1.submit();
}
}
</script>
</head>
<body bgcolor="#fff">
<?php
include "connection.php";
include "index6.php";
?>
<br><br>
<form action="addres.php" method="POST" name="f1">
<br><br>
<table border=0 align=center>
<tr>
<th align=left>Check-in Date :</th>
<td>
<input type="date" name="cid" max="2979-12-31" ><br>
</td>
</tr>
<tr></tr>
<tr>
<th align=left>Check-out Date :</th>
<td>
<input type="date" name="cod" max="2979-12-31"><br>
</td>
</tr>
<tr>
<th align=left>No Of Rooms :</th>
<td><select name=txtroom>
<?php
for($i=1;$i<=20;$i++)
{
echo "<option value=$i>$i</option>";
}
?>
</select></td>
<th align=left>Type :</th>
<td>
<?php
echo "<select name=txttype>";
$qup="select * from tariff group by type";
$query2="select * from hotel";
$con=mysqli_connect("localhost","root","",'hotelmanagement');
$rs=mysqli_query($con,$qup);
$hn=mysqli_query($con,$query2);
while($res=mysqli_fetch_row($rs))
{
echo "<option value='".$res[0]."'>".$res[0]."</option>";
}
echo "<select>";
echo "</td>";
?>
<td><a href=tariff.php>Tariff</a></td>
</tr>
<tr>
<th align=left>Hotel Name:</th>
<td>
<?php
echo "<select name=txthotel>";
$query2="select * from hotel";
$con=mysqli_connect("localhost","root","",'hotelmanagement');
$hn=mysqli_query($con,$query2);
while($res=mysqli_fetch_row($hn))
{
echo "<option value='".$res[1]."'>".$res[1]."</option>";
}
echo "<select>";
echo "</td>";
?>
</td>
</tr>
<tr>
<th align=left>Full Name :</th>
<td colspan=4><input type=text name=txtname size=50 disabled
value="<?php
$user=$_SESSION['username'];
$query="select `User Name` from `user` where Userid='$user'";
$con=mysqli_connect("localhost","root","",'hotelmanagement');
$hn=mysqli_query($con,$query);
$res=mysqli_fetch_row($hn);
echo htmlentities($res[0]);
?>"></td>
</tr>
<tr>
<th align=left>Email :</th>
<td colspan=4><input type="text" name="txtemail" size=50 disabled
value="<?php
$user=$_SESSION['username'];
$query="select `User Email` from `user` where Userid='$user'";
$con=mysqli_connect("localhost","root","",'hotelmanagement');
$hn=mysqli_query($con,$query);
$res=mysqli_fetch_row($hn);
echo htmlentities($res[0]);
?>"></td>
</tr>
<tr>
<th align=left>Company :</th>
<td colspan=4><input type=text name=txtcompany size=50 disabled
value="<?php
$user=$_SESSION['username'];
$query="select `User Company` from `user` where Userid='$user'";
$con=mysqli_connect("localhost","root","",'hotelmanagement');
$hn=mysqli_query($con,$query);
$res=mysqli_fetch_row($hn);
echo htmlentities($res[0]);
?>"></td>
</tr>
<tr>
<th align=left>Telephone :</th>
<td colspan=4><input type="text" name="txtnumber" size=50 disabled
value="<?php
$user=$_SESSION['username'];
$query="select `User Phone` from `user` where Userid='$user'";
$con=mysqli_connect("localhost","root","",'hotelmanagement');
$hn=mysqli_query($con,$query);
$res=mysqli_fetch_row($hn);
echo htmlentities($res[0]);
?>" ></td>
</tr>
<tr>
<th align=left valign=top>Address :</th>
<td colspan=4><textarea name=txtaddress rows=5 cols=45 disabled><?php
$user=$_SESSION['username'];
$query="select `User Address` from `user` where Userid='$user'";
$con=mysqli_connect("localhost","root","",'hotelmanagement');
$hn=mysqli_query($con,$query);
$res=mysqli_fetch_row($hn);
echo htmlentities($res[0]);
?>
</textarea></td>
</tr>
<tr>
<th align=left>Special Requirements, if any :</th>
<td colspan=4><textarea name=txtspanyreq rows=5 cols=45></textarea>
</tr>
<br />
<br />
<tr>
<td colspan=2 align=center><input type=button name=s1 value="submit" onClick="checkout()">
<input type=reset name=s2 value="clear"><a href=reservation.php></a></td>
</tr>
</table>
</form>
</body>
</html>