-
Notifications
You must be signed in to change notification settings - Fork 1
/
confirm.php
152 lines (118 loc) · 2.59 KB
/
confirm.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
session_start();
include('conncet.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Voyager - Confirmation</title>
</head>
<style>
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@700&family=Poppins:wght@400;500;600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
.box {
position: absolute;
width: 500px;
left: 526px;
top: 150px;
text-align: center;
padding: 20px;
background-color: rgba(90, 166, 238, 0.281);
}
.bus-info {
color: black;
background-color: rgb(90, 166, 238);
text-align: center;
}
body {
background-image: url("images/background.jpg");
background-color: linear-gradient(120deg, #feffff, #70d6ff);
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
margin: 0;
padding: 0;
/* background: linear-gradient(120deg, #2980b9, #8e44ad); */
height: 100vh;
overflow: hidden;
}
input[type="submit"] {
width: 100%;
height: 50px;
border: 1px solid;
background: #2691d9;
border-radius: 25px;
font-size: 18px;
color: #e9f4fb;
font-weight: 700;
cursor: pointer;
outline: none;
}
input[type="submit"]:hover {
border-color: #000000;
background: #1b7cbd;
transition: 0.5s;
}
h1 {
color: #c00;
font-family: sans-serif;
font-size: 2em;
margin-bottom: 0;
}
#nav_bar {
float: right;
}
#nav_bar li {
display: inline-block;
padding: 8px;
font-size: large;
}
#nav_bar #profile {
background: #4887ef;
margin-right: 25px;
padding: 7px 15px;
border-radius: 3px;
font-weight: bold;
}
.header {
background-color: #009879;
color: #ffffff;
text-align: left;
}
</style>
<body>
<?php
if(isset($_POST['bking']))
{
$uid = $_SESSION['userID'];
$bid = $_POST['bid'];
$sql = "UPDATE bus SET Seat_lft = (Seat_lft - 1) WHERE Bus_ID = '$bid';";
$result = mysqli_query($conn , $sql);
if($result)
{
$sql2 = "INSERT INTO booking(User_ID, Bus_ID, Booking_ID) VALUES('$uid', '$bid', '')";
$result2 = mysqli_query($conn , $sql2);
if($result)
{
?>
<h1>
<center> Booking Successfull </center>
</h1>
<h1>
<center> Click <a href="search.php">here</a> to search again </center>
</h1>
<?php
}
}
}
?>
</body>
</html>