Vous êtes sur la page 1sur 52

ONLINE FLIGHT TICKETBOOKING MANAGEMENT SYSTEM

ABSTRACT

The software entitled “ONLINE FLIGHT TICKETBOOKING MANAGEMENT


SYSTEM” is developed using PHP as front end tool and My-SQL as backend. The project
highlights the inevitable use of computers in the field of travel agency particularly in flight
reservation. It is an effective way to grow flightiness, improve customer service and reduce
operating costs while providing an end-to-end solution.

This main objective of this project is to help the travel agency to effectively manage the
day to day activities like ticket reservation and cancellation. The system supports to create
customized itineraries with an unlimited number of destinations and receive instant online price
estimates.

The system ensures that the ticket should be reserved at least ten days in advance.
If a ticket has to be reserved, the user must provide valid details about passport, date of birth and
communication address. The ticket reservation process is made so simple and accurate. When it
is done manually, there are opportunities where the numerical calculation may go wrong.

The system provides quick and easy interface for ticket cancellation. When the user
enters the passenger id, the ticket details would be shown. For every cancelled ticket, the
percentage of deducted amount would vary based on the date of cancellation done before the
journey. This project also provides well organized reports. Receipts for ticket reservation and
cancellation are provided. Flight details, Passenger details, Fare details, Collection and Refund
are some of the other reports supported.
CHAPTER 1

1. INTRODUCTION

ABOUT THE PROJECT

Now a day’s computer plays a vital role in all works of the human life. One of the
powerful sources, which are responsible for the present rapid development in all the fields, is
definitely the computer itself.

The project work entitled “Online flight ticket Booking Management System ” has been
developed using PHP as front end and My-SQL as back end in Windows XP platform. This
Application supports the management in maintenance of Passenger information; Flight
information, Tickets Reservation, Tickets cancellation and related information’s are maintained.
It produces daily, weekly, monthly and yearly reports of Online Ticket Booking System.

This project is modularly designed. It has four modules.

1. Maintenance Modules
2. Tickets Modules
3. Enquiry Modules
4. Report Modules
1.2 SYSTEM SPECIFICATION

1.2.1 Hardware configuration

 System : Pentium Extreme


 RAM : 1 GB
 Monitor : 14” Color Monitor
 Printer : Text printer
 Keyboard : SAMSUNG
 Mouse : Forntech

1.2.2 Software Specifications

 Operating System : Windows 7


 Front End : PHP
 Back End : MYSQL
Software description

PHP
PHP – the server-side programming language powering over 80% of the web – is now at
version 7.1. As an interpreted (as opposed to compiled) language, PHP code is executed in run-
time meaning there is no slow compilation step – changes you make in code are visible instantly,
and it is this quick feedback loop that allows for PHP’s speed of use.

Easy-to-learn and easy-to-use, PHP got the reputation of one in which developers can get
things done fast, but also get them done wrong. This channel focuses on the right ways to use
PHP.

PHP is a general-purpose scripting language that is especially suited to server-side web


development, in which case PHP generally runs on a web server. Any PHP code in a requested
file is executed by the PHP runtime, usually to create dynamic web page content or dynamic
images used on websites or elsewhere.

Features Of Php

Loosely Typed Language – PHP supports variable usage without declaring its data type.
It will be taken at the time of the execution based on the type of data it has on its value.

 Cross Platform Compatibility – It is used to create the desktop application by using


advanced PHP features.

 variable variables – PHP allows changing the variable name dynamically by using
variable variables.

 Real-Time Access Monitoring – PHP provides access logging by creating the summary
of recent accesses for the user.
 Magic Method – PHP has built in methods starts with __ (double underscore). These
methods can’t be called directly. Rather, it will be called on the event basis. For example,
__clone() will be called, when the clone keyword is used.

 Error Reporting – It has some predefined error reporting constants to generate a warning
or error notice. For example, when E_STRICT is enabled, a warning about deprecated
methods will be generated.

 Extended Regular Expression – PHP provides REGEX methods with extensive parsing
and pattern matching mechanism with remarkable speed.

 nowdocs and heredocs String – PHP provides the nowdocs and heredocs properties are
used to delimit some block of context. nowdocs and heredocs are same except the
context in the heredocs allow variable parsing.

 Traits – PHP is a single inheritance language. The traits concept is used to cover
inheritance limitation and support inheritance at multiple levels.

Mysql
MySQL is a full-featured relational database management system (RDBMS) that
competes with the likes of Oracle DB and Microsoft’s SQL Server. MySQL is sponsored by the
Swedish company MySQL AB, which is owned by Oracle Corp. However, the MySQL source
code is freely available because it was originally developed as freeware. MySQL is written in C
and C++ and is compatible with all major operating systems.

MySQL was a free-software database engine originally developed and first released in
1995. MySQL is named after My, the daughter Michael Widenius, of one of the product’s
originators. It was originally produced under the GNU General Public License, in which source
code is made freely available.
MySQL is very popular for Web-hosting applications because of its plethora of Web-
optimized features like HTML data types, and because it's available for free. It is part of the
Linux, Apache, MySQL, PHP (LAMP) architecture, a combination of platforms that is
frequently used to deliver and support advanced Web applications. MySQL runs the back-end
databases of some famous websites, including Wikipedia, Google and Facebook- a testament to
its stability and roflighttness despite its decentralized, free-for-all philosophy.

MySQL was originally owned by Sun Microsystems; when the company was purchased
by Oracle Corp. in 2010, MySQL was part of the package. Although MySQL is technically
considered a competitor of Oracle DB, Oracle DB is mainly used by large enterprises, while
MySQL is used by smaller, more Web-oriented databases. In addition, MySQL differs from
Oracle's product because it's in the public domain.

Features Of Mysql
A free, open source database that powers a wide range of web apps and tools
Store data in multiple storage engines including InnoDB, CSV, NDB, and more
 High Performance: MySQL is faster, more reliable and cheaper because of its unique
storage engine architecture.
 High Flexibility: MySQL supports a large number of embedded applications which
makes MySQL very flexible.
 High Productivity: MySQL uses Triggers, Stored procedures and views which allows the
developer to give a higher productivity.
 Replicate data and partition tables for better performance and durability
 Access database information with SQL commands
 Use triggers and views to enforce flightiness rules and show only data needed per user
 Available on 20+ platforms, including Mac, Windows, Linux, and Unix
CHAPTER 2
2. SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

In this flight travel agency, the availability of unreserved seats in the particular flight was
calculated manually. During this process the manual errors may occur which consumed more
time due to this problem they cannot gain passenger’s cent percent satisfaction.

Existing system is very primitive in which the travel details, route details and reservation
details that are performed and perform the one that they required then the bill is generated
manually and the mode of payment is also manual.

2.1.1 Drawbacks Of The Existing System

 The application does not provide security to the system.


 There is no flexibility to the database.
 There is no GUI interaction for more convenience.
 Coding is not much efficient.
 Most of the work is done manually.
2.2 PROPOSED SYSTEM

Our project is to computerize traveling company to manage data, so that all the
transactions become fast and there should not be any error in transaction like calculation mistake,
bill generation and other things. It replaces all the paperwork. It keeps records of all bills also,
giving to ensure 100 % successful implementation of the computerized Flight reservation
system.

Our flight ticket reservation system has three modules. First module helps the customer to
enquire the availability of seats in a particular flight at particular date. Second module helps him
to reserve a ticket. Using third module he can cancel a reserved ticket.

2.2.1 Advantages Of The Proposed System

 Maintaining the customer records properly. So that it can be used in an efficient way.
 To retrieve information quickly and rapidly as when required
 Reports are quickly available to the user
 Errors in calculations can be easily eliminated.
 Maintenance of reservation and cancellation of tickets in a more efficient way which
includes the automatic fetching of available seats during reservation.
CHAPTER 3
3. SYSTEM DESGIN

3.1 FILE DESIGN

This system contains the menus for various kinds of operations. Menus and Files are
created for displaying the information about user and company. This system also contains the
command buttons as part of the user interface. Information systems in flightiness are file and
database oriented. Data are accumulated into files that are proposed or maintained by the system.
The system analyst is responsible for designing files, determining their contents and selecting a
method for organizing the data.
System analysis decide the following input design details like, what data to input, what
medium to use, how the data should be arranged or coded, data items and transaction needing
validations to detect errors and at last the dialogue to guide user in providing input.

File designs are forms which as follows,

 Admin login

 Create flight details

 Seat availability details

 Edit or delete

 Booking and cancellation

 View date wise all reports

3.2 INPUT DESIGN


Input Design is one of the most expensive phases of the operation of computerized
system and is often the major problem of a system. A large number of problems with a system
can usually be tracked backs to fault input design and method.
Needless to say, therefore, that the input data is the lifeblood of a system and have to be
analyzed and designed with at most case and consideration.
The decisions made during the input design are

 To provide cost effective method of input

 To achieve the highest possible level of accuracy

 To ensure that input is understand by the user.

Input data of a system may not be necessarily is raw data captured in the system from
scratch. These can also be the output of another system or subsystem. The design of input covers
all phases of input from the creation of initial data to actual entering the data to the system for
processing. The design of input involves identifying the data needed, specifying the
characteristics of each data item, capturing & preparing data for computer processing and
ensuring correctness of data.
 Admin will basically be able to access all the modules in the application and will
have the option to approve a booking request raised by a user or user.
 User is an internal college who can log in and request for auditorium booking for
a specific date and time interval.
Menu driven programming is very easy to access the programs. In such a way the system
is developed. This system contains the following menus:

1. Passenger Details
Information about the passenger like passport number, passenger Name, address, sex,
qualification etc. details are very tedious to maintain in the existing system, that if it is
computerized the process will be very easy to operate.

2. Flight Details
Information about the Flight details like Flight number, departure time, arrival time,
source, destination etc. details are very tedious to maintain in the existing system, that if it is
computerized the process will be very easy to operate.
3. Reservation Details
Information about the Ticket reservation details like passport number, passenger number,
Flight number, Travel date, class, source etc are maintained.

4. Cancellation Details
Information about the cancellation form details like passport number, passenger number,
passenger name, and amount deducted, amount refunded etc are maintained.

3.3 OUTPUT DESIGN

Design output to serve the intended purpose - essentially, this means that the systems
objectives should be met but the objectives should be linked to the flightiness tactics. Design
output to fit the user - design for the person, not the position; remember human information
processing differences; issue of detail versus summary .Delivering the appropriate quantity of
output - don't create overload, create enough to perform flightiness tactics and make anything
else optional .Making sure the output is where it is needed - right person at the right place;
consider discontinuing printed output and see if anyone asks for it. Providing the output on time
(and for the right time period). Choosing the right output method- consider all senses (sound,
smell, touch?).

Computer output is the most important and direct source of information to the user.
Efficient, intelligible output design should improve the systems. It defines relationships with the
user and help indecision making. A major form of output is a hard copy from the printer. Printout
should be designed around the output requirements of the user. The output device with system,
response time requirements, expected print quality and number of copies needed.

In this system uses the list box, combo box for output display. The bills are also used to
be format of database grid. Mostly the outputs will be displayed on he screens as reports.

Report Design
Reports are produced using him utility data reports designs with the help of data
environment. Then accessory connections are made of database.

In this project we provide the following types of reports,

 Collection report
 Reservation report
 Flight details report
 Cancellation report

3.4 DATABASE DESIGN

Database design deals with the table structure and organization. The purpose of the
database is to enable easy access of information for the user. The general theme behind database
is to handle the information as an integrated one.

A table is a collection of data about a specific topic. For example a table can contain data
about customers, suppliers and the products. Tables organize data into columns (called fields)
and rows (called records). Database is the storage media where the data given by the user are
stored as such or processed and stored. The system accepts data from the database to generate
required information for the user database determines the purpose and exact application of the
system. While designing decided which facts are to be stored in it and divide the subjects &
create tables for each subject and determine the relationship between the data in each table to
other data in the other table. Verify the data by entering the sample records to produce the
results.

 Data Integration

 Data integrity

 Data independence

DATA INTEGRATION
In a database, information from several files are coordinated, accessed operated upon as
through it is in a single file. Logically, the information are centralized, physically, the data may
be located on different devices, connected through data communication facilities.

DATA INTEGRITY

Data integrity means storing all data in one place only how each application to access it.
This approach results in more consistent information, one update being sufficient to achieve a
new record status for all applications, which use it. This leads to less data redundancy; data items
need not be duplicated; a reduction in the direct access storage requirement.

DATA INDEPENDENCE

Data independence is the insulation of application programs from changing aspects of


physical data organization. This objective seeks to allow changes in the content and organization
of physical data without reprogramming of applications and to allow modifications to application
programs without reorganizing the physical data.

The tables needed for each module were designed and the specification were designed
and specification of each and every column was given based on the records and details collected
during record specification of each and every column was given based on the records details
collected during record inspection during system study.

3.5 SYSTEM DEVELOPMENT

MODULES:

 Maintenance module

 Tickets module

 Enquiry module

 Report module
3.5.1 Modules And Description

MAINTENANCE MODULE
Maintenance module is designed to mange details about passenger and Flights.
1. Passenger Details
This sub module is responsible for managing the passenger details. A separate
form and table will be designed to collect the passenger information.

2. Flight Details
Flight details sub module is designed to effectively manage the Flight
information. This also will maintain data about Flight route and the fare.

TICKETS MODULE
Ticket module performs booking and seating arrangement in a particular day and
particular time. Booking module consist of many provisions to look over the seats which contain
different destination points along with Flight fare details helps the passengers to have a complete
glance with a fraction of second.

Two separate forms are designed to manage FLIGHT TICKETreservation and


cancellation.

ENQUIRY MODULE
Enquiry module is designed to assist the user with quick availability of data for Flight
information and Flight fare information.

REPORT MODULE
The responsibility of this There are several reports are generated Flight report, passenger
report, collection details etc.,
CHAPTER 4
4. SYSTEM TESTING AND IMPLEMENTATION

4.1 SYSTEM TESTING

System testing is a process of checking whether the developed system is working


according to the original objectives and requirements. System should to be tested experimentally
with the test data so as to ensure that the system works according to the required specification.
When the system is found working, test it with the actual data and check the performance.

UNIT TESTING

In unit testing the user tests the programs making up a system. This test focuses on the
modules, independently of one another to locate errors. This enables the tester to deduct errors in
coding and logic that are contained within that module alone. The errors resulting from the
interaction between modules are initially avoided.

In this system, each form is unit tested. For example, in passenger information form,
passenger name is tested with lengthy name to test the max size of the name field. Similarly, the
dates are entered in wrong manner and checked.

INTEGRATION TESTING

After testing all the modules, the modules are integrated and testing of the final system is
done with the test data, specially designed to show that the system will operate successfully in all
its aspects conditions. Thus the system testing is a confirmation that all is correct and an
opportunity to show the user that the system works.

In this system, sample data for passenger information and flight information are initially
added. A flight ticket reservation and then ticket cancellation is done and tested for correctness.
ACCEPTANCE TESTING

The users find no major problems with its accuracy the system passes through a final
acceptance test. This last test confirms that the system meets the original goals, objectives and
requirements established during design. User acceptance of a system is the key factor for the
success of any system. The system under consideration is tested for user acceptance by
constantly keeping in touch with the prospective system users at the time of developing and
making changes where ever required.

The new system developed was tested by the acceptance testing method. Acceptance test
incorporates both unit testing and integration testing. The user provided test area. Thus the
system was successfully tested and it satisfies the user requirements. Afterwards it was
implemented successfully.

4.2 SYSTEM IMPLEMENTATION


Once the system has been developed, the system has to be tested and if no bugs found it
is to be implemented.

Implementation is process of converting a new or revised system design into an


operational one. The first task is implementation planning that is deciding on the methods and
time scale to be adopted. The proper implementation involves conversion of existing clerical
files to computer media and hence these files as they are get converted. Then the actual
changeover from the existing system to the new system takes place.

The changeover plays a vital role, which checks the developed tool for the following
requirements, and then only the developed tool will be accepted by the users.

The software has been checked with sample data. The changes being made are as per the
user requirements and will run in parallel with the manual system to find out any discrepancies.
The users also have been apprised of the ways of handling the software, as a part of training the
user personnel.
CHAPTER 5

5. CONCLUSION
This project entitled is developed to satisfy the maximum requirement of the user. This
project is developed for ticket reservation agents who, helps the customers to book and cancel their
ticket easily.The modules in this project such a customer details helps to get the information of
customer who are going to travel through online. Then the bourn ticketfrom helps to book the seats
through online,and once seats are booked. The ticket will be printed and issued to the customer.

In the cacel ticket from if the customer afle to travel ,the customer can cancel the ticket
and the paid amount is returned to the customer.This the online ticket booking for flight.help for
the customer to easily book and travels.

FUTURE ENHANCEMENTS

The “ONLINE FLIGHT TICKETBOOKING SYSTEM” is developed as per the system


analysis and the software requirements specification. Thus the system implemented will fulfill
the information storage and retrieval requirements of the users. The system is designed in such a
manner that to provide an easy interface to the end-users.

The system can be enhanced to add more features to maintain employee information,
their attendance details, salaries details etc. The system can be further enhanced to support to
remote login so that the details can be viewed through internet.
BIBLIOGRAPHY

TEXT BOOKS REFERRED

 Luke welling, Laura Thomson, “PHP and MYSQL Web development”, 3rd edition,
Pearson Education.
 Kevin Tat roe, “Programming PHP”, 3rd edition,Pearson Education.
 Andy Harris, “PHP/MYSQL Programming for the absolute beginner”.
 G.K Gupta, “Database Management System”.

WEBSITES REFERRED

 http:\\www.w3schools.com
 http:\\www.planet-php.net.com
 http:\\www.codeacademy.com
 http:\\www.1000projects.com
APPENDICES

A. DATA FLOW DIAGRAM

Level 0

LOGIN FORM
User name flight details FLIGHT BOOKING
USER password LOGIN
MANAGEMENT

flight flight details table


Level 1 details

Flight
schedule Flight schedule
User table
flight
bookin
g
Seat
availabl Seat available chart
e

Payment
history

Payment table
Level 2

maintain customer table


customer’s
details

update
flight flight flight details table
admin bookin details
g

confirm
cancelati Home loan table
on

Customer
Payment
history

Payment table
B.TABLE STRUCTURE

Table 1:

Table Name : Passenger Detail


Primary Key : Passport Number

Field Name Data Type Description

Passport Number Text Passport No. of the passenger

Passenger Name Text Name of the passenger

Phone Number Double Passenger’s phone number

Cell Number Double Passenger’s cell number

DOB Date Date of Birth

Sex Text Sex of the Passenger

Qualification Text Qualification

State Text State of the Passenger

Address Text Place of the Passenger

Table 2:
Table Name : Flight Detail
Primary key : Flight number
Field Name Data Type Description

Flight number Text Flight Number

Departure time Date & Time Starting time of Flight

Arrival time Date & Time Time of arrival

Economic Seats Long Number of seats

Source Text Place of departure

Destination Text Place of arrival

Schedule Text Nature of travel

Flightiness Seats Long Number of seats

Table 3:

Table Name : Reservation From


Foreign Key : passport Number

Field Name Data Type Description


Passport Number Text Passport No. of the passenger
Passenger number Text Number of the passenger
Flight Number Text Flight number
Travel Date Date Date of travel
Class Text Type of class
Fare Double Net amount
Source Text Place of departure
Destination Text Place of arrival
Status Text Confirm/Waiting list
Meals Text Veg / Non-veg
Citizenship Text NRI/RI
Seat Number Integer Seat number of passenger
Booking Date Date Date of Booking

Table 4:

Table Name : Cancellation form


Foreign Key : Passport Number

Field Name Data Type Description


Passport Number Text Passport No. of the passenger
Passenger Name Text Name of the passenger
Passenger Number Text Number of passenger
Address Text Place of the passenger
Citizenship Text NRI/RI
Sex Text Sex of passenger
Flight Number Text Flight Number
From Text Place of Departure
To Text Place of Arrival
Meals Text Veg / Non-veg
Status Text Confirm/Waiting list
Fare Double Net amount
Traveling Date Date Date of travel
Boarding Place Text Departure place
Destination Text Arrival place
Class Text Type of class
Seat Number Integer Seat number of passenger
Amount Deducted Text Discount amount in percent
Amount Refunded Text Net amount
C.SAMPLE CODING

<html>
<head>
<title> Star Flight </title>
</head>
<style>

k{
color:green;
font-size:20px;
background-color:#f28858;
height:100px;
width:1345px;
position:absolute;
top:1px;
left:0px;
right:0px;
}

n{
color:white;
font-size:20px;
background-color:#f28858;
height:220px;
width:100%;
position:absolute;
left:0px;
}

nav {
background-color:#f28858;
height: 40px;
width: 1345px;
position:absolute;
top:97;
right:0px;
}

nav ul{
list-style-type:none;
float:right;
}
nav li{
float:left;
margin-right:12px;
}

div{
position:absolute;
top:200px;
right:80px;

border:1px solid black;


background:skyblue;
width:400px;
border-radius:15px;
}
pub{
text-align:center;
background-color: blue;
position:absolute;
height: 40px;
width: 100px;
top:145;
left:350px;
}

puk{
text-align:center;
background-color: blue;
position:absolute;
height: 59px;
width: 270px;
top:155;
left:550px;
}

body
{
background-color:white;
}

pub{

text-align:center;
background-color: blue;

position:absolute;
height: 40px;
width: 900px;
top:145;
left:230px;
}

pun{

text-align:center;
background-color: blue;
position:absolute;
height: 40px;
width: 550px;
top:145;
left:360px;
}

crt{

text-align:center;
font-family:Britannic;
background-color:skyblue;
position:absolute;
height: 60px;
width: 480px;
top:150px;
left:430px;

crt{

text-align:center;
font-family:Britannic;
background-color:red;
position:absolute;
height: 40px;
width: 580px;
top:150px;
left:370px;

bk{
border: 2px solid black;
border-radius: 6px;
text-align:center;
background-color:blue;
height: 40px;
width: 480px;
position:absolute;
top:250px;
left:430px;

}
nw
{
border: 1px solid blue;
border-radius: 6px;
text-align:center;
background-color:lightgreen;
height: 40px;
width: 320px;
position:absolute;
top:380px;
left:505px;

</style>
<k>
<nav>
<ul >
<li><a href="index.html"><font face="Gunplay" font size="4"
color="white">HOME</a></li></font>
<li><a href="about.html"><font face="Gunplay" font
size="4" color="white">About</a></li></font>
<li><a href="mybookings.html"><font face="Gunplay" font
size="4" color="white">My Booking</a></li></font>
<li><a href="cancellation.html"><font face="Gunplay"
font size="4" color="white">Cancellation</a></li></font>
<li><a href="print.html"><font face="Gunplay" font
size="4" color="white">Print Ticket</a></li></font>
<li><a href="contact.html"><font face="Gunplay" font
size="4" color="white">Contact Us</a></li></font>
</ul></nav>

<imgl>
&#160;&#160;&#160;&#160;<img src="images/logo.png" />
</imgl>
</k>

<br><br><br><br><br><br><br><br>

<?php
$con=mysqli_connect("localhost","root","","flight_ticket");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$email='';
$mob='';

if (isset($_POST['email']))
{
$email=$_POST['email'];
}

if (isset($_POST['mob']))
{
$mob=$_POST['mob'];
}
$sql = "SELECT email,pnr,bid,fromLoc,toLoc,dep_date,dep_time ,arr_time,fare,mob,status
FROM reserves,passenger,route WHERE passenger.pid = reserves.pid and email='$email' and
mob ='$mob' and reserves.rid=route.rid ";
$retval = mysqli_query( $con, $sql);
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}
$row=mysqli_fetch_array($retval);

if ($row['pnr'] != '' )
{

$sql = "SELECT email,pnr,bid,fromLoc,toLoc,dep_date,dep_time ,arr_time,fare,mob,status


FROM reserves,passenger,route WHERE passenger.pid = reserves.pid and email='$email' and
mob ='$mob' and reserves.rid=route.rid and status='booked' ";
$retval = mysqli_query( $con, $sql);
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}
$row=mysqli_fetch_array($retval);

if ($row['pnr'] != '' )
{

$count=0;
echo "
<puk>
<font face='Impact' font size='7' color='yellow'>Your Tickets</font>
</puk>
<br><br><br><br><br>

<center><table border='3' style='border-color: green; cellspacing='11' cellpadding='11'>


<tr>

<th border='2'>PNR</th>
<th border='2'>Flight_id</th>
<th border='2'>From</th>
<th border='2'>To</th>
<th border='2'>Journey Date</th>
<th border='2'>Time</th>
<th border='2'>Arival time</th>
<th border='2'>Fare(&#8377;)</th>
<th border='2'>Status</th>
<th border='2'>Cancel

</th>
<th border='2'>Print</th>
</tr border='2'>";

$sql = "SELECT email,pnr,bid,fromLoc,toLoc,dep_date,dep_time ,arr_time,fare,mob,status


FROM reserves,passenger,route WHERE passenger.pid = reserves.pid and email='$email' and
mob ='$mob' and reserves.rid=route.rid and status='booked' ";
$retval = mysqli_query( $con, $sql);
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}

while($row = mysqli_fetch_array($retval,MYSQL_ASSOC))
{

$count=1;
echo "<tr>";

echo "<td border='2'> <center>". $row['pnr']."</center></td>";

echo "<td border='2'><center>". $row['bid']."</center></td>";

echo "<td border='2'><center>" . $row['fromLoc']. "</center></td>";

echo "<td border='2'><center>". $row['toLoc']."</center></td>";

echo "<td border='2'><center>" . $row['dep_date']."</center> </td>";

echo "<td border='2'><center>". $row['dep_time']."</center></td>";

echo "<td border='2'><center>" . $row['arr_time']. "</center></td>";

echo "<td border='2'><center>". $row['fare']."/-</center></td>";


echo "<td border='2'><center>". $row['status']."</center></td>";

echo "<td border='2'><center><form action='cancel.php' method='post'><input type='hidden'


name='pnr' value=". $row['pnr'].">
<input type='hidden' name='email' value=". $row['email'].">
<input type='hidden' name='mob' value=". $row['mob'].">
<input type='hidden' name='mob' value='$mob'><input type='hidden' name='status'
value='booked'><input type='submit' value='cancel ticket'></form></center> </td>";
echo "<td border='2'><center><form action='print.php' method='post'><input type='hidden'
name='pnr' value=". $row['pnr']."><input type='hidden' name='mob'
value=".$row['mob']."><input type='submit' value='print'></form></center></td>";
echo "</tr border='2'>";
}
echo "</center></table><p>
<br><br><br><br><br><br>";
}
else
{

$sql = "SELECT email,pnr,bid,fromLoc,toLoc,dep_date,dep_time ,arr_time,fare,mob,status


FROM reserves,passenger,route WHERE passenger.pid = reserves.pid and email='$email' and
mob ='$mob' and reserves.rid=route.rid and status='cancelled' ";
$retval = mysqli_query( $con, $sql);
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}

echo "<pub><font face='Cursive' font size='5' color='yellow'>Currently You Don't have Any
Booked Tickets, Here is your cancelled Tickets.</font></pub>
<br><br><br>";
echo "<center><table border='3' style='border-color: green; cellspacing='13' cellpadding='13'>
<tr>
<th border='2'>PNR</th>
<th border='2'>Flight_id</th>
<th border='2'>From</th>
<th border='2'>To</th>
<th border='2'>Journey Date</th>
<th border='2'>Time</th>
<th border='2'>Arival time</th>
<th border='2'>Fare(&#8377;)</th>
<th border='2'>Status</th>
</tr border='2'>";

while($row = mysqli_fetch_array($retval,MYSQL_ASSOC))
{

$count=1;
echo "<tr>";
echo "<tr border='2'>";

echo "<td border='2'> <center>". $row['pnr']."</center></td>";

echo "<td border='2'><center>". $row['bid']."</center></td>";

echo "<td border='2'><center>" . $row['fromLoc']. "</center></td>";

echo "<td border='2'><center>". $row['toLoc']."</center></td>";

echo "<td border='2'><center>" . $row['dep_date']."</center> </td>";

echo "<td border='2'><center>". $row['dep_time']."</center></td>";

echo "<td border='2'><center>" . $row['arr_time']. "</center></td>";

echo "<td border='2'><center>". $row['fare']."/-</center></td>";


echo "<td border='2'><center>". $row['status']."</center></td>";
echo "</tr border='2'>";
}
echo "</center></table><p>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>

";

else if ( $email == '' && $mob == '')


{
echo "
<pun>
<font face='Cursive' font size='5' color='yellow'>Please Enter Your email id & Mobile
Number...</font></a>
</pun>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
";

else
{
echo "
<crt>
<font face='Cursive' font size='5' color='yellow'>Please Enter Correct email id Or Mobile
Number...</font></a>
</crt>
<br><br><br><center><font face='Cursive' font size='5' color='blue'>OR</font></center> <br>

<bk>
<font face='Cursive' font size='5' color='yellow'>You Have not booked any Tickets
yet...</font></a>
</bk>

<nw>
<a href='book.html'><font face='Arial' font size='6' >Book Tickets Now<br></font></a>
</nw>
<br><br><br><br><br><br><br><br><br><br><br><br><br>

";
}

mysqli_close($con);
?>

<n>
<font face="Gunplay" font size="3" color="white"><h3>&#160;&#160;About STAR Flight
Booking</h3></font>
<font face="Gunplay" font size="2"
color="white"><p>&#160;&#160;Star Flight is a registerd online flight booking website by the
Our Star team. <br>&#160;&#160;Any issues can be brought up to the judicial of the Bangalore
High Court, Bangalore. </p></font>
<ul >
<li><a href="about.html"> <font face="Gunplay" font size="2"
color="white">About</a> </li></font>
<li><a href="tc.html"> <font face="Gunplay" font size="2"
color="white">Term of Services</a> </li></font>

</ul>

<font face="Gunplay" font size="2" color="white">&#160;&#160;STAR FLIGHT BOOKING


COPYRIGHT © 2002-2015 ALL RIGHT
RESERVED.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160
;&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16
0;&#160;&#160;&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16
0;&#160;&#160;&#160;

</font>
<img2>
<img src="soc.png" />
</img2>

</n>

</body>
</html>
D.SAMPLE OUTPUT

SAMPLE SCREENS

Vous aimerez peut-être aussi