-
Notifications
You must be signed in to change notification settings - Fork 1
/
flightlist.php
121 lines (94 loc) · 3.11 KB
/
flightlist.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
<?php
session_start();
$con=mysqli_connect("localhost","root","","airline_reservation");
if(!isset($con))
{
die("Database Not Found");
}
if(isset($_REQUEST["u_sub"]))
{
$id=$_POST['pnr'];
if($id!='')
{
$query=mysqli_query($con ,"select * from flight_details where departure_date='".$id."'");
$res=mysqli_fetch_row($query);
$query0=mysqli_query($con ,"select * from flight_details where departure_date='".$id."'");
$res0=mysqli_fetch_row($query0);
$query1=mysqli_query($con ,"select * from flight_details where departure_date='".$id."'");
$res1=mysqli_fetch_row($query1);
if($res)
{
$_SESSION['user']=$id;
header('location:flightcheck.php');
}
else
{
echo '<script>';
echo 'alert("No Flight")';
echo '</script>';
}
if($res0)
{
$_SESSION['user']=$id;
header('location:flightcheck.php');
}
else
{
echo '<script>';
echo 'alert("No Flight")';
echo '</script>';
}
if($res1)
{
$_SESSION['user']=$id;
header('location:flightcheck.php');
}
else
{
echo '<script>';
echo 'alert("No Flight")';
echo '</script>';
}
}
else
{
echo '<script>';
echo 'alert("No Flight")';
echo '</script>';
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/login.css"></link>
<link rel="stylesheet" href="bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="bootstrap/bootstrap-theme.min.css">
<script src="bootstrap/jquery.min.js"></script>
<script src="bootstrap/bootstrap.min.js"></script>
<title></title>
</head>
<body style="background-image:url('./images/inbg.jpg');" >
<form id="index" action="flightlist.php" method="post">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
</div>
</div>
<div id="divtop">
<center>
<br> <br><br>
<div id="dmain" >
<center><img src="./images/irctc.jpg" width="180px" height="150px" ></center>
<br>
<input type="text" id="u_id" name="pnr" class="form-control" style="width:300px; margin-left: 66px;" placeholder="YYYY-MM-DD"><br>
<input type="submit" id="u_sub" name="u_sub" value="Check Flights" class="toggle btn btn-primary" style="width:100px; margin-left: 70px;"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>