Airline Reservation System Project Report
Airline Reservation System Project Report
Submitted By
GOMATHY M U19UU21S0011
KR MANASA U19UU21S0037
ANTIM SHARMA U19UU21S0103
Certificate
Principal
Examiners:
1) Date:
Place: Bangalore
2)
Acknowledgment
Above all, we want to thank God Almighty for the blessings, health, wisdom, knowledge,
and strength he has given to us. It is only by his will that we are able to start and complete
this project.
We wish to express our sincere gratitude to the Late A. Krishnappa, the chairman of South
East Asian Educational Trust for providing good infrastructure and adequate equipment’s
for the proper functioning of the institution.
We also thank Dr. Muthe Gowda T N, the Principal of SEA College of Science, Commerce
and Arts for his tireless effort in managing the College making sure that everything runs in
proper order.
We sincerely thank P. Santhi Theja, the Head of the Department of UG, Megha HR our project
guide, for their constant support, advice, and guidance which greatly contributed to the
successful completion of this project. We also wish to express our gratitude the all the staff
in the Computer Science Department of their support, concern and encouragement not only
to the project but also in our studies.
We also want to thank our parents for their guidance, support, encouragement, advice and
prayers. And also, for providing all the materials we need, not only for our studies but also
for our well-being if not for them, we will not be here today.
We also want to thank our brothers and sisters for their support and advice which helped in
the successful completion of this project.
Table of Contents
1 Synopsis 1
2 Introduction 3
3 System Analysis 5
4 Technologies Used 6
5 General Description 12
7 System Architecture 20
8 System Model 25
9 Screen Shots 36
10 Data Base 41
11 Coding 44
12 Conclusion 59
13 Limitation 60
14 Future Enhancement 61
15 Bibliography 62
1. Synopsis
A) Title of Project:
B) Objective:
An airline reservation system aims to streamline the reservation process by providing users with a user-
friendly interface to search for and book flights. It ensures real-time availability updates and secure payment
processing. The system manages customer information and booking history efficiently
C) Description:
An airline reservation system is a comprehensive platform designed to facilitate the reservation of flights for
customers. It allows users to search for available flights based on various criteria such as destination, dates,
and times, and provides options to select and book tickets.
D) Modules:
User Module
Hardware Requirements:
Processor : Standard processor with a speed of 1.6 GHz
RAM : 512 MB
1
Software Requirements:
2
2. Introduction
The Airline Reservation System project, developed using PHP, represents an advanced and streamlined
approach to managing flight bookings and user interactions.
This system is designed to cater to both travelers and airline operators by providing a comprehensive platform
for searching, booking, and managing flights.
The primary goal of this project is to create a web-based application that simplifies the process of booking
airline tickets. By utilizing PHP, a popular server-side scripting language, the system ensures dynamic content
management and interactive functionalities. This facilitates real-time flight searches, user registrations, secure
logins, and seamless booking transactions.
Technical Framework:
• PHP Language:
PHP is employed for server-side scripting, enabling the creation of dynamic web pages and interaction
with the MySQL database. It handles business logic, user authentication, and data processing
efficiently.
• MySQL Database:
MySQL is used to manage and store essential data such as user profiles, flight details, and booking
records. This relational database system supports complex queries and ensures data integrity and
security.
• Web Interface:
The front end of the system is built using HTML and potentially CSS for styling, providing an intuitive
and user-friendly interface. This allows users to search for flights, view availability, and make bookings
with minimal effort
• Hardware:
The system operates on basic hardware configurations, including a Pentium processor and 256 MB of
RAM, ensuring that it is accessible on standard computing environments.
3
• Software:
It relies on XAMPP, a comprehensive web server package that includes Apache, PHP, and MySQL,
running on a Windows operating system. This setup provides a stable environment for both
development and deployment.
Core Features:
The system facilitates user registration and authentication, allowing users to create accounts, log in
securely, and manage their personal details. PHP handles user sessions and password security, ensuring
safe and private access to the system.
Users can search for available flights based on criteria such as departure and arrival locations, dates,
and times. The system displays search results and allows users to select and book flights. Real-time
data processing ensures accurate and up-to-date information.
3. Booking Management:
Once a flight is booked, users can view and manage their bookings, including modifications and
cancellations. The system provides a comprehensive overview of booking details, including flight
information and payment history.
4. Data Management:
The backend database, managed using MySQL, stores critical information such as user profiles, flight
schedules, and booking records. PHP scripts interact with the MySQL database to perform operations
like data retrieval, updates, and deletions, ensuring the system operates efficiently and accurately.
4
3. System Analysis
Functional Requirements:
Users must be able to register for an account, log in securely, and manage their profiles. The system
should handle user authentication and session management.
• Flight Search:
Users should be able to search for flights based on various parameters, including departure and arrival
locations, dates, and times. The system should provide real-time search results.
• Booking Management:
Users must be able to select available flights, book tickets, and view their booking history. The system
should support booking modifications and cancellations.
The system needs to manage and store user information, flight schedules, and booking details. This
includes handling CRUD (Create, Read, Update, Delete) operations on the database.
Non-Functional Requirements:
• Performance:
The system should respond quickly to user requests and handle multiple concurrent users efficiently.
• Security:
User data and transactions should be protected through encryption and secure coding practices. PHP’s
session management and password hashing should ensure secure access.
• Scalability:
The system should be able to scale to accommodate increased user load and additional features in the
future.
5
4. Technology Used
The next major step in PHP's evolution came in 1997, when Zeev Suraski and Andi Gutmans, two
developers from Israel, rewrote the core of PHP to improve its performance and add new features. Their work
led to the release of PHP 3 in 1998, which was the first version to be officially named "PHP: Hypertext
Preprocessor," a recursive acronym. PHP 3 introduced a more powerful and flexible engine, which
significantly broadened its appeal to web developers.
Building on the success of PHP 3, Suraski and Gutmans continued to refine the language. In 1999, they
developed the Zend Engine, a new scripting engine for PHP, which became the foundation for PHP 4. Released
in 2000, PHP 4 brought several enhancements, including improved performance, better resource management,
and support for more complex web applications. The Zend Engine became a crucial part of PHP's architecture,
providing a stable and efficient platform for executing PHP code.
PHP 5, released in 2004, represented another major leap forward. It introduced full support for object-
oriented programming (OOP), which made PHP more versatile and aligned it with other modern programming
languages. PHP 5 also featured improved support for XML, better MySQL integration, and the introduction
of the PHP Data Objects (PDO) extension, which provided a consistent interface for database access.
The development of PHP continued with the release of PHP 7 in 2015, which was a major update aimed at
improving performance and reducing memory usage. PHP 7 was built on the Zend Engine 3.0 and introduced
several new features, including scalar type declarations, return type declarations, and a new error handling
6
model. These enhancements made PHP significantly faster and more efficient, helping it remain competitive
in the evolving web development landscape.
In 2020, PHP 8 was released, introducing the Just-In-Time (JIT) compilation feature, which further
boosted performance by optimizing the execution of PHP code. PHP 8 also brought new syntax features, such
as match expressions and attributes, making the language more expressive and easier to use.
Throughout its history, PHP has grown from a simple set of scripts into a powerful and widely-used
programming language that powers a large portion of the web. It has maintained its popularity due to its ease
of use, flexibility, and the strong support of a large and active community of developers. Today, PHP continues
to be a critical tool for web development, with millions of websites and applications relying on it for their
backend operations.
• Web Development:
PHP is widely used for building dynamic websites and web applications. Its ability to
embed directly into HTML makes it easy to create interactive web pages.
• Content Management Systems (CMS):
PHP powers many popular CMS platforms like WordPress, Joomla, and Drupal,
making it ideal for developing and customizing CMS-driven websites.
• E-commerce Websites:
PHP is commonly used to build e-commerce platforms such as Magento,
WooCommerce (for WordPress), and OpenCart, due to its robust database integration
and flexibility.
• Server-Side Scripting:
PHP excels in server-side scripting, handling tasks such as form processing, session
management, and file uploads, making it an excellent choice for backend development.
• Rapid Prototyping:
PHP’s simplicity and extensive library support allow developers to quickly prototype
and develop applications, making it a preferred choice for startups and small businesses.
• API Development:
7
PHP is suitable for creating RESTful APIs, enabling easy communication between
different software applications.
• Building Scalable Applications:
With frameworks like Laravel, Symfony, and CodeIgniter, PHP supports the
development of scalable and maintainable web applications.
• Learning and Teaching Programming:
PHP’s easy-to-learn syntax and vast community resources make it an excellent
language for beginners and educators in web development.
• Custom Web Solutions:
PHP is highly flexible, making it ideal for creating custom web solutions tailored to
specific business needs.
PHP is known for its straightforward syntax, which makes it accessible to beginners. The language benefits
from a large, active community that contributes to its continuous improvement. Overall, PHP’s versatility,
performance, and ease of use ensure its relevance in modern web development.
Versatile
PHP is versatile in numerous ways. It can be used for a wide range of web development tasks, from
creating simple static websites to building complex, data-driven web applications and APIs. Its ability to
integrate seamlessly with various databases, including MySQL, PostgreSQL, and SQLite, allows developers
to manage and store data effectively.
PHP operates across different operating systems such as Windows, Linux, and macOS, and is compatible
with various web servers like Apache and Nginx. Its extensibility is enhanced by a rich ecosystem of
8
frameworks like Laravel and Symfony, which offer pre-built components and tools for diverse development
needs.
Additionally, PHP’s command-line capabilities extend its use beyond web development, enabling tasks like
server automation and data processing. This flexibility allows PHP to be customized to meet specific project
requirements, making it a highly adaptable language.
Secure
PHP is secure in several ways. It offers built-in functions and features designed to protect against
common web vulnerabilities. For instance, it includes tools for data sanitization and validation, which help
prevent SQL injection and cross-site scripting (XSS) attacks. PHP also supports secure communication
through encryption and hashing functions, ensuring sensitive data such as passwords are stored safely.
Additionally, PHP frameworks often come with security features that help enforce best practices, such as
secure authentication and authorization mechanisms. Regular updates and patches from the PHP community
also address known security issues, contributing to a more secure environment for web applications.
Nonetheless, it is crucial for developers to follow secure coding practices and stay informed about potential
vulnerabilities to maintain robust security in their applications.
Scalable
PHP is scalable due to its ability to handle varying levels of web traffic and application complexity.
Its efficiency in managing server resources and the capability to run on different platforms make it suitable
for both small and large-scale applications. PHP frameworks like Laravel and Symfony provide tools and
patterns that facilitate the development of scalable architectures, including support for caching, load
balancing, and modular design. Additionally, PHP’s compatibility with various database systems allows for
scalable data management solutions, enabling applications to grow and adapt to increasing user demands.
With proper architecture and optimization strategies, PHP can support the scaling of web applications to
accommodate significant increases in traffic and functionality
9
Maintainable
PHP is scalable due to its ability to handle varying levels of web traffic and application complexity.
Its efficiency in managing server resources and the capability to run on different platforms make it suitable
for both small and large-scale applications. PHP frameworks like Laravel and Symfony provide tools and
patterns that facilitate the development of scalable architectures, including support for caching, load balancing,
and modular design. Additionally, PHP’s compatibility with various database systems allows for scalable data
management solutions, enabling applications to grow and adapt to increasing user demands. With proper
architecture and optimization strategies. PHP can support the scaling of web applications to accommodate
significant increases in traffic and functionality.
10
URLs
While it is possible to process requests from every single URL via a single function, it is much
more maintainable to write a separate view function to handle each resource. A URL mapper is used
to redirect HTTP requests to the appropriate view based on the request URL. The URL mapper can
also match particular patterns of strings or digits that appear in a URL and pass these to a view function
as data.
View:
A view is a request handler function, which receives HTTP requests and returns HTTP
responses. Views access the data needed to satisfy requests via models, and delegate the formatting of
the response to templates.
Models:
Models are PHP objects that define the structure of an application's data, and provide
mechanisms to manage (add, modify, delete) and query records in the database.
Templates:
A template is a text file defining the structure or layout of a file (such as an HTML page),
with placeholders used to represent actual content. A view can dynamically create an HTML page
using an HTML template, populating it with data from a model. A template can be used to define the
structure of any type of file; it doesn't have to be HTML.
Portable
PHP is highly portable, which means it can run on various operating systems and web servers
without modification. This cross-platform capability allows developers to build applications that
work on different environments, such as Windows, Linux, and macOS. PHP’s flexibility extends to
web servers, including Apache, Nginx, and Microsoft IIS, making it adaptable to different hosting
setups. Additionally, PHP can interface with a wide range of databases, such as MySQL,
PostgreSQL, and SQLite, which enhances its portability in managing data across different systems.
This compatibility ensures that PHP applications can be deployed and operated on various platforms
and configurations with minimal adjustments, facilitating ease of development and deployment.
11
5. General Description
Customers
• Responsibilities:
o Search Flights: Enter search criteria (e.g., departure and arrival cities, dates) to find available
flights.
o View Flight Details: Review flight options, including times, prices, and layovers.
o Book Flights: Choose a flight, enter passenger information, and complete the booking
process.
o Manage Bookings: Access, modify, or cancel existing bookings.
o Payment Processing: Enter payment details and complete transactions securely.
o Receive Confirmation: Obtain booking confirmation and receive a confirmation email.
o Customer Support: Reach out for assistance with bookings, refunds, or issues.
Administrators
• Responsibilities:
o Flight Management: Update flight schedules, availability, and pricing information.
o User Management: Handle customer accounts, permissions, and support requests.
o Report Generation: Create and analyze reports on bookings, transactions, and system usage.
o System Configuration: Adjust settings such as payment gateways and email templates.
o Customer Support Oversight: Address complex customer issues and escalate problems as
needed.
Support Staff
• Responsibilities:
o Assist Users: Help customers with booking inquiries, account issues, and troubleshooting.
o Issue Resolution: Handle customer complaints and escalate issues to administrators when
necessary.
12
o Documentation: Update support documentation and FAQs based on common queries and
issues.
2 .Key Features
Search Functionality
Booking
Customer Support
13
3 .User Interface Design Principles
Usability
• Principles:
o Clarity: Use clear and concise language and visuals.
o Consistency: Maintain consistent design elements and terminology throughout the interface.
o Feedback: Provide immediate feedback for user actions (e.g., successful bookings, error
messages).
o Navigation: Ensure intuitive navigation with well-organized menus and search
functionalities.
Accessibility
• Principles:
o Keyboard Accessibility: Ensure all functionalities are accessible via keyboard navigation.
o Screen Readers: Make sure the interface is compatible with screen readers for visually
impaired users.
o Contrast and Color: Use high contrast and distinguishable colors to aid users with color
blindness.
o Responsive Design: Ensure the interface adapts to different devices and screen sizes for a
consistent experience.
4. Workflow:
14
4. Results Display: System displays available flights matching the criteria with filters and sorting
options.
Selecting a Flight
1. Flight Review: User reviews detailed flight options and selects a preferred flight.
2. Booking Initiation: User clicks on the selected flight to proceed with the booking.
Booking a Flight
1. Passenger Information: User enters necessary passenger details and selects any additional services.
2. Summary Review: System presents a booking summary for user review.
3. Confirmation: User confirms booking details and proceeds to payment.
5. System Components
Frontend
Backend
15
o APIs: Facilitate communication between frontend and backend services, including flight
search and payment processing.
Database
16
6. Functional Requirements and Non-functional Requirements
Functional Requirements :
1. User Registration and Authentication
• Registration: Users must be able to register by providing details such as name, email, and password.
• Login/Logout: Registered users should be able to log in and log out of their accounts.
• Password Management: Users should be able to reset their passwords if forgotten.
• Search Criteria: Users must be able to search for flights based on criteria such as departure and
arrival cities, travel dates, and number of passengers.
• Flight Results: The system should display a list of available flights matching the search criteria.
• Filters and Sorting: Users should be able to filter and sort search results by various parameters (e.g.,
price, duration, airline).
• Flight Selection: Users should be able to select flights from search results.
• Passenger Information: Users must enter passenger details during the booking process.
• Additional Services: Users should have the option to select additional services like baggage or seat
upgrades.
4. Customer Support
• Support Access: Users should have access to support through various channels such as FAQs, live
chat, and email.
• Ticketing System: Support staff should be able to create and manage support tickets for user
inquiries and issues.
17
5. Security and Privacy
• Data Protection: Ensure that user data, including payment information, is securely handled and
stored.
• Authentication: Implement secure authentication mechanisms to protect user accounts.
• Authorization: Ensure proper authorization for different user roles (e.g., customers, administrators).
Non-Functional Requirements
1. Performance
• Response Time: The system should provide search results and process bookings within a reasonable
time frame (e.g., under 2 seconds for search results).
• Scalability: The system should be able to handle a growing number of users and transactions without
significant performance degradation.
2. Reliability
• Uptime: The system should have high availability with minimal downtime. Target uptime should be
99.9% or higher.
• Error Handling: The system should handle errors gracefully and provide informative error
messages to users.
3. Usability
• User Interface: The system should have an intuitive and user-friendly interface that facilitates easy
navigation and task completion.
• Accessibility: The system should be accessible to users with disabilities, adhering to standards such
as WCAG (Web Content Accessibility Guidelines).
18
4. Security
• Data Encryption: Sensitive data, including personal and payment information, should be encrypted
during transmission (e.g., using HTTPS) and storage.
• Authentication and Authorization: Secure authentication and authorization mechanisms should be
in place to prevent unauthorized access.
5. Maintainability
• Code Quality: The system’s codebase should be well-organized, documented, and follow best
practices for maintainability.
• Modularity: The system should be designed in a modular fashion to facilitate easy updates and
maintenance.
6. Portability
• Browser Compatibility: The system should be compatible with major web browsers (e.g., Chrome,
Firefox, Safari, Edge).
• Device Compatibility: The system should be responsive and work on various devices, including
desktops, tablets, and smartphones.
7. Compliance
• Legal Compliance: The system should comply with relevant laws and regulations, such as data
protection laws (e.g., GDPR) and payment processing standards (e.g., PCI-DSS).
19
[Link] Architecture
The architecture is designed to ensure a robust, scalable, and user-friendly system for managing airline
reservations. It is divided into three main layers:
Additionally, there are integrations with external services and considerations for security and performance.
Responsibilities:
21
▪ Flights Table: Contains flight details including schedules, availability, and pricing.
▪ Bookings Table: Records reservation details, including passenger information and
booking status.
▪ Payments Table: Manages transaction records and payment details.
o Data Access Layer: SQL queries and stored procedures used to interact with the database.
Responsibilities:
22
3. Security Considerations
• Authentication: Secure login mechanisms using hashed passwords and session management.
• Authorization: Role-based access control to manage permissions for different types of users (e.g.,
customers vs. administrators).
2. Data Protection
• Encryption: Use HTTPS for secure data transmission and encrypt sensitive data stored in the
database.
• Sanitization: Validate and sanitize user inputs to prevent SQL injection and other security
vulnerabilities.
1. Load Balancing
• Description: Distribute incoming requests across multiple servers to balance the load and ensure
high availability.
2. Caching
• Description: Implement caching mechanisms to reduce database load and improve response times.
Use caching solutions like Redis or Memcached.
3. Database Optimization
• Description: Optimize database performance by using indexing, optimizing queries, and maintaining
efficient schema design.
23
5. System Maintenance
1. Monitoring
• Description: Continuously monitor system performance, server health, and error logs to detect and
resolve issues proactively.
• Description: Regularly update the system to address bugs, security vulnerabilities, and add new
features.
24
[Link] Model
Unified Modeling Language (UML) is a standardized general-purpose modeling language in the field
of object-oriented software engineering. The Unified Modeling Language includes a set of graphic notation
techniques to create visual models of object-oriented software- intensive systems. Unified Modeling
Language is used to specify, visualize, modify, construct and document the artifacts of an object-oriented
software-intensive system under development.
Use case diagrams model the functionality of system using actors and use cases. These diagrams are central
to modeling the behavior of a system, a subsystem, or a class.
Sequence Diagram :
A sequence diagram is a kind of interaction diagram that shows how processes operate with one another and
in what order. It is a construct of a Message Sequence chart. Sequence diagram are sometimes called Event
diagrams, event scenarios and timing diagrams.
Class Diagrams :
Class Diagrams is a type of static structure diagram that describes the structure of a system by showing the
system's classes, their attributes, operations (methods) and the relationships among the classes. It can also be
described as a set of objects that share the same attributes, operations, relationships, and semantics.
25
ER Diagram:
26
An Entity-Relationship (ER) diagram is a visual representation of the data and its relationships in a database
system. It consists of entities, which are objects or concepts that can have data stored about them, and
relationships, which illustrate how these entities interact with one another. Entities are typically represented
by rectangles, while relationships are shown as diamonds connecting these rectangles. Attributes of entities
are often depicted as ovals connected to their respective entity rectangles. ER diagrams help in designing and
understanding the structure of a database by clearly outlining how different data elements relate to each other,
facilitating both database creation and management. They are instrumental in ensuring that the database
structure supports the necessary queries and operations needed by an organization or application.
27
USE CASE DIAGRAM FOR CUSTOMER
Registration
Payment
28
USECASE DIAGRAM FOR CUSTOMER REGISTRATION
name
password
Customer
Confirm password
Register
29
USECASE DIAGRAM CUSTOMER SEARCH
From location
To location
Date
Customer
Search
Book flight
30
USECASE DIAGRAM FOR CUSTOMER SERVICE
Login
Register
Flight search
Customer
Services
31
Purpose of Use Case Diagrams
The purpose of use case diagram is to capture the dynamic aspect of a system. However, this definition is
too generic to describe the purpose, as other four diagrams (activity, sequence, collaboration and Statechart)
also have the same purpose. We will look into some specific purpose, which will distinguish it from other
four diagrams.
Use case diagrams are used to gather the requirements of a system including internal and external
influences. These requirements are mostly design requirements. Hence, when a system is analyzed to gather
its functionalities, use cases are prepared and actors are identified.
When the initial task is complete, use case diagrams are modelled to present the outside view.
Use case diagrams are considered for high level requirement analysis of a system. When the requirements
of a system are analyzed, the functionalities are captured in use cases. We can say that use cases are nothing
but the system functionalities written in an organized manner. The second thing which is relevant to use
cases are the actors. Actors can be defined as something that interacts with the system. Actors can be a
32
When we are planning to draw a use case diagram, we should have the following items identified.
• The name of a use case is very important. The name should be chosen in such a way so
that it
can identify the functionalities performed.
• Give a suitable name for actors.
• Show relationships and dependencies clearly in the diagram.
• Do not try to include all types of relationships, as the main purpose of the diagram is to
identify
the requirements.
• Use notes whenever required to clarify some important points.
As we have already discussed there are five diagrams in UML to model the dynamic view of a system.
Now each and every model has some specific purpose to use. Actually these specific purposes are different
angles of a running system. To understand the dynamics of a system, we need to use different types of
diagrams. Use case diagram is one of them and its specific purpose is to gather system requirements and
actors. Use case diagrams specify the events of a system and their flows. But use case diagram never
describes how they are implemented. Use case diagram can be imagined as a black box where only the
input, output, and the function of the black box is known.
These diagrams are used at a very high level of design. This high level design is refined again and again to
get a complete and practical picture of the system. A well-structured use case also describes the pre-
condition, post condition, and exceptions. These extra elements are used to make test cases when performing
33
the testing. Although use case is not a good candidate for forward and reverse engineering, still they are used
in a slightly different way to make forward and reverse engineering. The same is true for reverse
engineering. Use case diagram is used differently to make it suitable for reverse engineering.
In forward engineering, use case diagrams are used to make test cases and in reverse engineering use cases
are used to prepare the requirement details from the existing application.
SDLS
The SDLC (Software Development Life Cycle) method will be used to defining tasks performed at each step
in the software development process. SDLC is a structure followed by a development team within the
software organization. It consists of a detailed plan describing how to develop, maintain and replace specific
software.
34
35
Waterfall Model:
For SDLC, we used Waterfall Model which is developed by W. W. Royce and defined as the development
of sequential completion of one steps after the other like analysis, design, implementation, testing,
integration and maintenance.
Feasibility Study:
A feasibility study is an analysis that considers all of a project's relevant factors— including economic,
technical, legal, and scheduling considerations—to ascertain the likelihood of completing the project
successfully. We perform different feasibility study whether to take project further or [Link] are:
Economic Feasibility:
After studying all the requirement, we came to know that software is profitable or not for us.
Technical Feasibility:
We also study, what type of technology to used in the project and to developed the project.
Operational Feasibility: We also research on whether the staff can operate it properly or not.
36
9. Screen Shots
37
38
39
40
41
10. Database
DATABASE DESIGN
ATTRIBUTES TYPE
ID Numeric
NAME Varchar
E-mail Varchar
Password Varchar
Table: User
The above table stores the details of the user when they get registered. These details will be further
used in validating the user when they login.
42
TABLE NAME : FLIGHT TABLE
ATTRIBUTES TYPE
departure_time datetime
43
DATA FLOW DIAGRAM
A data flow diagram (DFD) is a graphical representation of the "flow" of data through an
information system.
Data flow refers to the movement of data within the system and between different components.
Understanding the data flow is crucial for ensuring that the airline reservation system functions efficiently
and accurately. Here’s an overview of the data flow in the system:
44
11. Coding
[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home - FlyHigh Airlines</title>
<link rel="stylesheet" href="[Link]">
<link rel="preconnect" href="[Link]
<link rel="preconnect" href="[Link] crossorigin>
<link
href="[Link]
rel="stylesheet">
</head>
<body>
<header>
<div class="container">
<div class="logo">FlyHigh Airlines</div>
<nav>
<ul>
<li><a href="[Link]">Home</a></li>
<li><a href="[Link]">Book a Flight</a></li>
<li><a href="[Link]">Contact Us</a></li>
<li><a href="[Link]">Logout</a></li>
</ul>
</nav>
</div>
</header>
<main>
45
<section class="home-banner">
<div class="container">
<h1>Welcome to FlyHigh Airlines</h1>
<p>Your gateway to seamless travel experiences!</p>
</div>
</section>
<section class="services">
<div class="container">
<h2>Our Services</h2>
<div class="service-cards">
<div class="card">
<h3>Flight Booking</h3>
<p>Book flights to various destinations with ease and convenience.</p>
</div>
<div class="card">
<h3>Travel Insurance</h3>
<p>Get comprehensive travel insurance for a worry-free journey.</p>
</div>
<div class="card">
<h3>24/7 Support</h3>
<p>Our support team is available round the clock to assist you.</p>
</div>
</div>
</div>
</section>
</main>
<footer>
<div class="container">
<p>© 2024 FlyHigh Airlines. All rights reserved.</p>
</div>
</footer>
</body>
</html>
46
[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search Flights - FlyHigh Airlines</title>
<link rel="stylesheet" href="[Link]">
<link rel="preconnect" href="[Link]
<link rel="preconnect" href="[Link] crossorigin>
<link
href="[Link]
rel="stylesheet">
</head>
<body>
<header>
<div class="container">
<div class="logo">FlyHigh Airlines</div>
<nav>
<ul>
<li><a href="[Link]">Home</a></li>
<li><a href="[Link]">Book a Flight</a></li>
<li><a href="[Link]">Contact Us</a></li>
<li><a href="[Link]">Logout</a></li>
</ul>
</nav>
</div>
</header>
<main>
<section class="search-flights">
<div class="container">
<h2>Search Flights</h2>
<form id="searchForm">
47
<div class="form-group">
<label for="from">From:</label>
<input type="text" id="from" name="from" placeholder="City or Airport" required>
</div>
<div class="form-group">
<label for="to">To:</label>
<input type="text" id="to" name="to" placeholder="City or Airport" required>
</div>
<div class="form-group">
<label for="departure">Departure Date:</label>
<input type="date" id="departure" name="departure" required>
</div>
<div class="form-group">
<button type="button" id="searchFlightsButton">Search Flights</button>
</div>
</form>
<div id="flightResults"></div>
</div>
</section>
</main>
<footer>
<div class="container">
<p>© 2024 FlyHigh Airlines. All rights reserved.</p>
</div>
</footer>
<script>
[Link]('searchFlightsButton').addEventListener('click', function() {
const from = [Link]('from').[Link]();
const to = [Link]('to').[Link]();
const departure = [Link]('departure').[Link]();
48
// Simulating random flight data for demonstration
const flightNames = [
`Flight from ${from} to ${to} - Flight Number: FH${[Link]([Link]() * 1000)}`,
`Flight from ${from} to ${to} - Flight Number: FH${[Link]([Link]() * 1000)}`,
`Flight from ${from} to ${to} - Flight Number: FH${[Link]([Link]() * 1000)}`
];
displayFlights(flightNames);
});
function displayFlights(flights) {
const resultsDiv = [Link]('flightResults');
[Link] = '<h3>Available Flights</h3>';
[Link](flight => {
const flightDiv = [Link]('div');
[Link] = 'flight-option';
[Link] = `
<p>${flight}</p>
<button class="bookFlightButton">Book Now</button>
`;
[Link](flightDiv);
});
49
[Link]
<?php
session_start();
if (isset($_SESSION['user'])) {
header("location:[Link]");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login to FlyHigh Airlines</title>
<link rel="stylesheet" href="[Link]">
<link rel="preconnect" href="[Link]
<link rel="preconnect" href="[Link] crossorigin>
<link
href="[Link]
rel="stylesheet">
</head>
<body>
<header>
<div class="logo">FlyHigh Airlines</div>
<div class="login-link">Not registered yet? <a href="[Link]">Register
Here!</a></div>
</header>
<main>
<section class="login-form">
<h2>Login Here!</h2>
<?php
if (isset($_POST['login'])) {
$email = $_POST['email'];
$password = $_POST['password'];
require_once "[Link]";
$q = "SELECT * FROM users WHERE email='$email'";
50
$result = mysqli_query($con, $q);
$user = mysqli_fetch_array($result, MYSQLI_ASSOC);
if ($user) {
if (password_verify($password, $user['password'])) {
session_start();
$_SESSION["user"] = "yes";
header("location:[Link]");
exit();
} else {
echo "<div class='alert alert-danger'>Password does not match</div>";
}
} else {
echo "<div class='alert alert-danger'>Email does not match</div>";
}
}
?>
<form action="[Link]" method="post">
<div class="form-group">
<input type="email" id="email" name="email" placeholder="Email" required>
</div>
<div class="form-group">
<input type="password" id="password" name="password" placeholder="Password"
required>
</div>
<div class="form-group">
<button type="submit" name="login">Login</button>
</div>
</form>
</section>
</main>
<footer>
<p>© 2024 FlyHigh Airlines. All rights reserved.</p>
</footer>
</body>
</html>
51
[Link]
?php
session_start();
session_destroy();
header("location:[Link]");
?>
[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register - Airline Reservation</title>
<link rel="stylesheet" href="[Link]">
<link rel="preconnect" href="[Link]
<link rel="preconnect" href="[Link] crossorigin>
<link
href="[Link]
rel="stylesheet">
</head>
<body>
<header>
<div class="logo">FlyHigh Airlines</div>
<div class="login-link">Already have an account? <a href="[Link]">Login Here!</a></div>
</header>
<main>
<section class="registration">
<h2>Register for an Account</h2>
<form action="[Link]" method="post">
<?php
if (isset($_POST['submit'])) {
52
$fullname = $_POST['fullname'];
$email = $_POST['email'];
$password = $_POST['password'];
$passwordRepeat = $_POST['repeat_password'];
$errors = array();
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
array_push($errors, "Email is not valid");
}
if (strlen($password) < 8) {
array_push($errors, "Password must be at least 8 characters long");
}
if ($password !== $passwordRepeat) {
array_push($errors, "Passwords do not match");
}
require_once "[Link]";
$q = "SELECT * FROM users WHERE email='$email'";
$result = mysqli_query($con, $q);
$rowCount = mysqli_num_rows($result);
if ($rowCount > 0) {
array_push($errors, "Email already exists!");
}
if (count($errors) > 0) {
echo "<div class='alert alert-danger'>";
foreach ($errors as $error) {
echo "<p>$error</p>";
}
echo "</div>";
} else {
$q = "INSERT INTO users (full_name, email, password) VALUES (?, ?, ?)";
$stmt = mysqli_stmt_init($con);
if (mysqli_stmt_prepare($stmt, $q)) {
53
mysqli_stmt_bind_param($stmt, "sss", $fullname, $email, $passwordHash);
mysqli_stmt_execute($stmt);
echo "<div class='alert alert-success'>You have registered successfully.</div>";
} else {
die("Something went wrong.");
}
}
}
?>
<div class="form-group">
<input type="text" id="fullname" name="fullname" placeholder="Full Name"
value="<?php if (isset($fullname)) echo $fullname; ?>" required>
</div>
<div class="form-group">
<input type="email" id="email" name="email" placeholder="Email" value="<?php if
(isset($email)) echo $email; ?>" required>
</div>
<div class="form-group">
<input type="password" id="password" name="password" placeholder="Password"
required>
</div>
<div class="form-group">
<input type="password" id="repeat_password" name="repeat_password"
placeholder="Confirm Password" required>
</div>
<div class="form-group">
<button type="submit" name="submit">Register</button>
</div>
</form>
</section>
</main>
<footer>
<p>© 2024 FlyHigh Airlines. All rights reserved.</p>
</footer>
</body>
</html>
54
search_flight.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search Flights - FlyHigh Airlines</title>
<link rel="stylesheet" href="[Link]">
<link rel="preconnect" href="[Link]
<link rel="preconnect" href="[Link] crossorigin>
<link
href="[Link]
rel="stylesheet">
</head>
<body>
<header>
<div class="container">
<div class="logo">FlyHigh Airlines</div>
<nav>
<ul>
<li><a href="[Link]">Home</a></li>
<li><a href="[Link]">Book a Flight</a></li>
<li><a href="search_flights.html">Search Flights</a></li>
<li><a href="[Link]">Login</a></li>
<li><a href="[Link]">Register</a></li>
<li><a href="[Link]">Contact Us</a></li>
</ul>
</nav>
</div>
</header>
<main>
<section class="search-flights">
<div class="container">
55
<h2>Search Flights</h2>
<form id="searchForm" method="post">
<div class="form-group">
<label for="from">From:</label>
<input type="text" id="from" name="from" placeholder="City or Airport" required>
</div>
<div class="form-group">
<label for="to">To:</label>
<input type="text" id="to" name="to" placeholder="City or Airport" required>
</div>
<div class="form-group">
<label for="departure">Departure Date:</label>
<input type="date" id="departure" name="departure" required>
</div>
<div class="form-group">
<button type="button" id="searchFlightsButton">Search Flights</button>
</div>
</form>
<div id="flightResults"></div>
</div>
</section>
</main>
<footer>
<div class="container">
<p>© 2024 FlyHigh Airlines. All rights reserved.</p>
</div>
</footer>
<script>
[Link]('searchFlightsButton').addEventListener('click', function() {
const flightNames = [
'Flight AA1234 - New York to London',
'Flight BA5678 - London to Paris',
'Flight CA9101 - Los Angeles to Tokyo',
'Flight DA1122 - Sydney to Dubai',
'Flight EA3344 - Frankfurt to Rome'
];
56
const getRandomFlights = () => {
let results = [];
for (let i = 0; i < 3; i++) {
[Link](flightNames[[Link]([Link]() * [Link])]);
}
return results;
};
[Link]('.bookFlightButton').forEach(button => {
[Link]('click', function() {
alert('Flight booked successfully!');
});
});
});
</script>
</body>
</html>
57
[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us - FlyHigh Airlines</title>
<link rel="stylesheet" href="[Link]">
<link rel="preconnect" href="[Link]
<link rel="preconnect" href="[Link] crossorigin>
<link
href="[Link]
rel="stylesheet">
</head>
<body>
<header>
<div class="container">
<div class="logo">FlyHigh Airlines</div>
<nav>
<ul>
<li><a href="[Link]">Home</a></li>
<li><a href="[Link]">Book a Flight</a></li>
<li><a href="[Link]">Contact Us</a></li>
<li><a href="[Link]">Logout</a></li>
</ul>
</nav>
</div>
</header>
<main>
<section class="contact">
<div class="container">
<h2>Contact Us</h2>
<div class="contact-info">
<div class="contact-card">
58
<h3>Airlines Contact Information</h3>
<p><strong>Email:</strong> contact@[Link]</p>
<p><strong>Phone:</strong> +91 1234567890</p>
<p><strong>Address:</strong> Bengaluru, Karnataka</p>
/div>
<div class="random-contact">
<h3>Customer Service Contact</h3>
<p><strong>Name:</strong> Yuvraj Kunwar</p>
<p><strong>Email:</strong> customercare@[Link]</p>
<p><strong>Phone:</strong> +91 8951006400</p>
</div>
</div>
</div>
</section>
</main>
<footer>
<div class="container">
<p>© 2024 FlyHigh Airlines. All rights reserved.</p>
</div>
</footer>
</body>
</html>
[Link]
<?php
$dbHost = "localhost";
$dbUser = "root";
$dbPassword = "";
$dbName = "login_register";
$con = mysqli_connect($dbHost, $dbUser, $dbPassword, $dbName);
if(!$con){
die("Connection failed: " . mysqli_connect_error());
}
?>
59
12. Conclusion
The development of an airline reservation system using PHP has demonstrated the significant advantages of
integrating modern web technologies to enhance user experience and operational efficiency. Throughout the
project, we have successfully implemented a range of features, including user account management, flight
search, booking functionality, and payment processing. These functionalities collectively contribute to a
streamlined and user-friendly interface that simplifies the booking process for passengers.
The airline reservation system built with PHP not only fulfills its primary objective of facilitating flight
bookings but also sets a foundation for future developments. By continually incorporating user feedback and
leveraging emerging technologies, the system has the potential to evolve and adapt to the changing needs of
the airline industry. This project highlights the effectiveness of PHP in creating dynamic and interactive web
applications, paving the way for more advanced and user-centric solutions in the future.
60
13. Limitation
Despite the successes of the airline reservation system project, several limitations have been identified that
may impact its overall effectiveness and user experience. Addressing these limitations is crucial for
improving the system and ensuring its continued relevance and efficiency.
1. Scalability Issues
2. Limited Integration Capabilities
3. Security Vulnerabilities
4. User Experience Variability
5. Limited Reporting and Analytics
6. Dependency on Internet Connectivity
7. Complexity of Maintenance and Updates
8. Regulatory and Compliance Challenges
61
15. Future Enhancement
Looking ahead, several enhancements could significantly elevate the capabilities and user experience of the
airline reservation system. First, integrating advanced machine learning algorithms could provide personalized
recommendations and dynamic pricing based on user behavior and market trends. Implementing a more robust
integration with global distribution systems (GDS) and additional airline APIs would offer a broader range of
flight options and real-time updates, improving booking accuracy and customer satisfaction. Enhancing the
user interface with AI-driven chatbots could streamline customer support, offering instant assistance and
resolving common queries more efficiently. Furthermore, expanding the system's capabilities to include
mobile applications would enhance accessibility and convenience for users on the go. Additionally,
incorporating advanced analytics and reporting tools would provide valuable insights into user preferences
and system performance, enabling more informed decision-making and targeted marketing strategies. Finally,
ensuring the system's adaptability to emerging technologies and evolving regulatory requirements will be
crucial for maintaining its relevance and security in the long term. These enhancements will collectively
contribute to a more dynamic, user-centric, and competitive reservation system.
62
15. Bibliography
• [Link].: [Link]
• [Link].: [Link]
• W3Schools.: [Link]
• [Link].: [Link]
• PHP: The Right Way.: [Link]
• TutorialsPoint.: [Link]
• TutorialsPoint.: [Link]
• OWASP: [Link]
• [Link].: [Link]
63