-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment.php
130 lines (97 loc) · 3.55 KB
/
payment.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" media="screen" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/font-awesome.css" rel="stylesheet" type="text/css" />
<title>Assam Tourism</title>
<link rel="stylesheet" type="text/css" href="css/my_style.css">
<link src="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<!-- -->
<style>
@charset "UTF-8";
/* CSS Document */
body {
width:100px;
height:100px;
background: -webkit-linear-gradient(90deg, #16222A 10%, #1b9b38 90%); /* Chrome 10+, Saf5.1+ */
background: -moz-linear-gradient(90deg, #16222A 10%, #1b9b38 90%); /* FF3.6+ */
background: -ms-linear-gradient(90deg, #16222A 10%, #1b9b38 90%); /* IE10 */
background: -o-linear-gradient(90deg, #16222A 10%, #1b9b38 90%); /* Opera 11.10+ */
background: linear-gradient(90deg, #16222A 10%, #1b9b38 90%); /* W3C */
font-family: century gothic;
}
p {
color:#CCC;
}
.spacing {
padding-top:7px;
padding-bottom:7px;
}
.middlePage {
width: 680px;
height: 500px;
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
.logo {
color:#CCC;
}
.hh{
height:auto;
}
.form-control{
width: 360px;
}
</style>
</head>
<body>
<div class="middlePage">
<div class="panel panel-info hh">
<div class="panel-heading">
<h3 class="panel-title" id="regname">Congratulation</h3>
</div>
<div class="panel-body">
<div class="row" style="color:black;">
<?php
$conn = mysql_connect('localhost','root','','kdlogin');
if(! $conn )
{
die('Could not connect: ' . mysql_error());
}
$debit = $_POST['debitcard'];
$ccv = $_POST['ccv'];
$hname=$_POST['hname'];
$uid=$_POST['uid'];
$troom=$_POST['troom'];
$nroom=$_POST['nroom'];
$uroom=$troom-$nroom;
//echo $uid;
//echo $hname;
mysql_select_db('kdlogin');
$sql = "UPDATE bookdata SET payment = 'done' WHERE bookid='".$uid."';";
$retval = mysql_query( $sql, $conn );
$sql = "UPDATE hotelroom SET rooms =".$uroom." WHERE hotelname='".$hname."';";
$retval = mysql_query( $sql, $conn );
echo "<p style=\"font-size: 24px; font-weight: bold; color: #2c3e50; text-align: center; padding-top:15px; padding-bottom:15px;\">YOUR $nroom ROOMS HAVE BEEN BOOKED</p>";
mysql_close($conn);
?>
<br>
<div style="text-align: center;">
<a href="index.html"><button type="button" class="btn btn-info" >Go to Home Page</button></a></div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>