-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbookinstatus.php
149 lines (115 loc) · 2.72 KB
/
bookinstatus.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
<html>
<head>
<title>BOOKING STATUS</title>
</head>
<body>
<style>
*{
margin: 0;
padding: 0;
}
body{
background: url("images/carbg2.jpg");
background-position: center;
}
.box{
position:center;
top: 50%;
left: 50%;
padding: 20px;
box-sizing: border-box;
background: #fff;
border-radius: 4px;
box-shadow: 0 5px 15px rgba(0,0,0,.5);
background: linear-gradient(to top, rgba(255, 251, 251, 1)70%,rgba(250, 246, 246, 1)90%);
display: flex;
align-content: center;
width: 700px;
height: 250px;
margin-top: 100px;
margin-left: 350px;
}
.box .content{
margin-left: 5px;
font-size: larger;
}
.box .button{
width: 240px;
height: 40px;
background: #ff7200;
border:none;
margin-top: 30px;
font-size: 18px;
border-radius: 10px;
cursor: pointer;
color:#fff;
transition: 0.4s ease;
}
.utton{
width: 200px;
height: 40px;
background: #ff7200;
border:none;
font-size: 18px;
border-radius: 5px;
cursor: pointer;
color:#fff;
transition: 0.4s ease;
margin-top: 10px;
margin-left: 10px;
}
.utton a{
text-decoration: none;
color: white;
font-weight: bold;
}
ul{
float: left;
display: flex;
justify-content: center;
align-items: center;
margin-top: 100px;
}
ul li{
list-style: none;
margin-left: 200px;
margin-top: -130px;
font-size: 35px;
}
.name{
font-weight: bold;
}
</style>
<?php
require_once('connection.php');
session_start();
$email = $_SESSION['email'];
$sql="select * from booking where EMAIL='$email' order by BOOK_ID DESC LIMIT 1";
$name = mysqli_query($con,$sql);
$rows=mysqli_fetch_assoc($name);
if($rows==null){
echo '<script>alert("THERE ARE NO BOOKING DETAILS")</script>';
echo '<script> window.location.href = "cardetails.php";</script>';
}
else{
$sql2="select * from users where EMAIL='$email'";
$name2 = mysqli_query($con,$sql2);
$rows2=mysqli_fetch_assoc($name2);
$car_id=$rows['CAR_ID'];
$sql3="select * from cars where CAR_ID='$car_id'";
$name3 = mysqli_query($con,$sql3);
$rows3=mysqli_fetch_assoc($name3);
?>
<ul><li> <button class="utton"><a href="cardetails.php">Go to Home</a></button></li><li class="name">HELLO! <?php echo $rows2['FNAME']." ".$rows2['LNAME']?></li>
</ul>
<div class="box">
<div class="content">
<h1>CAR NAME : <?php echo $rows3['CAR_NAME']?></h1><br>
<h1>NO OF DAYS : <?php echo $rows['DURATION']?></h1><br>
<h1>BOOKING STATUS : <?php echo $rows['BOOK_STATUS']?></h1><br>
</div>
</div>
<?php }
?>
</body>
</html>