Biswaaaproject
Biswaaaproject
Project Report
On
“ONLINE HOTEL BOOKING SYSTEM”
Submitted for the partial fulfillment of the requirement for the degree of
MASTER OF COMPUTER APPLICATION
Submitted by
BISWANATH MAHARANA
ROLL NO: 21MC025
REGD. NO: 2105287025
1|Page
GITA AUTONOMOUS COLLEGE, BHUBANESWAR
Department of Master of Computer Application
Ref no:………… Date:……………
CERTIFICATE
This is to certify that the project report entitled “ONLINE HOTEL BOOKING SYSTEM”
submitted by BISWANATH MAHARANA Regd. No. 2105287025 is an authentic work
carried out by him at GITA under my guidance. The matter embodied in this project work has
not been submitted earlier for the award of any degree or diploma to the best of my knowledge
and belief.
Examined by:
(External Supervisor)
2|Page
GITA AUTONOMOUS COLLEGE, BHUBANESWAR
Department of Master of Computer Application
ACKNOWLEDGEMENT
Lastly, words run to express my gratitude to all the faculties of the MCA
Department and friends for their support and co-operation, constructive
criticism, and valuable suggestion during preparation of this project
report.
Thanking All.
Signature of Student
3|Page
GITA AUTONOMOUS COLLEGE, BHUBANESWAR
Department of Master of Computer Application
DECLARATION
I hereby declare that the project report entitled "ONLINE HOTEL BOOKING
SYSTEM" submitted by me to GITA AUTONOMOUS COLLEGE,
BHUBANESWAR in partial fulfillment of the requirement for the award of the
degree of Master of Computer Application is a record of Bonafede project work
carried out by me under the guidance of Prof. Subhasish Mohanty.
I further declare that the work reported in this project has not been submitted
and will not be submitted, either in part or in full, for the award of any other degree
or diploma in this institute or any other institute or university.
4|Page
ABSTRACT
The Hotel Management Booking System is a comprehensive software solution designed to streamline
the process of managing hotel bookings and reservations. This system aims to provide an efficient and
user-friendly interface for both guests and hotel staff, enhancing the overall experience of managing
hotel operations.
The system incorporates features such as real-time room availability, reservation management,
booking modifications, check-in/check-out processing, and reporting. Users can search for available
rooms based on their preferences, make reservations, and receive confirmation emails or receipts for
successful bookings.
For hotel staff, the system offers functionality for managing reservations, tracking room availability,
processing check-ins and check-outs, and generating reports to gain insights into occupancy rates,
revenue, and other key metrics. Integration with payment gateways enables secure online
transactions, while authentication and authorization mechanisms ensure data privacy and security.
The Hotel Management Booking System aims to optimize resource allocation, improve operational
efficiency, and enhance guest satisfaction. By automating manual processes and providing a
centralized platform for managing bookings, this system reduces the likelihood of errors, minimizes
double bookings, and enables effective decision-making based on data-driven insights.
Overall, the Hotel Management Booking System offers a robust and scalable solution for hotels and
other accommodation providers to efficiently manage their booking operations, improve customer
service, and drive business growth.
5|Page
INDEX
1. INTRODUCTION 7-9
• PROJECT PURPOSE
• PROJECT SCOPE
• SOFTWARE REQUIREMENTS
• HARDWARE REQUIREMENTS
• FUNCTION DETAILS
• FUNCTIONAL REQUIREMENTS
3. SYSTEM DESIGN 16-25
5. IMPLEMENTATION 67-74
8. CONCLUSION 79
9. REFERENCES 80
6|Page
CHAPTER ONE
INTRODUCTION
Hotel Management System is a system that provides us to reserving rooms, checking whether the
rooms are vacant are or not etc by using online browsing. This system is very useful to all especially
for business people. For Business people they don’t have sufficient time for these then they can use
these type of online Hotel Management Systems. By this project we will reduce the faults in bills of
their expenditure and decrease time of delay to give the bills to the customers. We can also save the
bills of the customer. By this project we can also include all the taxes on the bills according to their
expenditures. It has a scope to reduce the errors in making the bills. Computerized bill can be printed
within fraction of seconds. Online ordering of Booking is possible by using this software. This Project
is based on php . If any one wants to book the room for few days then they can specify the specific
number by seeing the types of rooms we have. The bill of this online booking is based on the type of
room they can select is displayed.
HOTEL MANAGEMENT SYSTEM is a hotel reservation site script where site users will be able to search
rooms availability with an online booking reservations system. Site users can also browse hotels, view
room inventory, check availability, and book reservations in real-time.
Site users enter check in date and check out date then search for availability and rates. After choosing
the right room in the wanted hotel – all booking and reservation process is done on the site and an
SMS is sent to confirm the booking.
Administrator Panel
Account Manager
Hotels Manager
Hotels – Administrator can manage hotels that will appear on the site with the hotel name,
description, facilities, phone and fax
Room Types – Administrator can define the type of rooms in the hotels, rooms prices and upload an
image for each room.
7|Page
Hotel Rooms – For each Hotel the administrator can define the rooms available, rooms number, max
occupants and remarks on the specific room.
Bookings – All booking and reservations maid on the site are displayed with all booking details: arrival
date, departure date, hotel name, room type, number of passengers, price.
Available rooms – Administrator can also search for room availability from the administrators panel
and does not have to go on the site Reports.
Booking Statistics – Administrator can view statistics of booking on bar charts that show the
difference in bookings according to months.
Site Settings – Here the administrator can define if to use online payment on the site and if yes then
what will be the online payment email address used, the administrator can also define the
administrator email address where all reservation emails will be sent to.
1.1 Purpose
The purpose of hotel booking system is to automate the existing manual system by the help of
computerized equipments and full fledged computer software, fulfilling their requirement, so that
their valuable or information can be stored for a longer period with easy accesing and manipulating
of the same . The required software and hardware are easily available and easy to work with.
This proposes that efficiency of hotel organizations could be improved by integrating service-oriented
operations service-oriented operations with project management principles. Such integration would
instill innovation, proactive attitudes and regulated risk-taking needed to pursue ongoing
improvement and proactive response to change. By managing each change as a project, embedded in
smoothly running operations, hotels would extend their life span by continuously reinventing
themselves.
1.1.1 Advantages:
The advantages of booking a hotel online add up long before your arrival. Our legendary customer
service extends to the web One advantage of booking with the hotel directly is the use of the hotel's
full cancellation policy as well as not needing a deposit in most situations.
8|Page
Read reviews and compare prices for Online Hotel Booking. The most important advantage of online
hotel booking is convenience, you can book your room by simply sitting in home. Internet helps you
to browse through the hotels around the world and compare the facilities and rates easily.
1.2 Scope
In this step, we provide a detailed description about the existing system and the problems faced in the
existing system. This stage there is no existing system previously; we are developing a new system. Till
now no system is available with this type of features and facilities. This system is developed for the all
types of users with highly flexible and configurable product is envisaged to ensure global marketing .
▪ Some of the service providers won't allow you to choose your hotel, they only allow you to
select location and quality of the hotel. Considerable discounts on hotels may be available in
off-seasons.
▪ Utilize the serve of online hotel booking service providers when you are planning for a trip.
▪ Each and every customer looks to book their hotel rooms early and conveniently.
▪ User can Post, update and delete the links in the all categories. Online hotel booking is the
best ways to book rooms in your favourite hotels.
▪ Planning a vacation has never been easier and more reasonable than now.
▪ Easiness, affordable pricing, and simple comparison shopping make online hotel bookings
accepted to all.
9|Page
CHAPTER TWO
SYSTEM ANALYSIS
Requirement analysis for web applications encompasses three major tasks: formulation, requirements
gathering and analysis modeling. During formulation, the basic motivation and goals for the web
application are identified, and the categories of users are defined. In the requirementsgathering
phase, the content and functional requirements are listed and interaction scenarios written from end-
user’s point-of-view are developed. This intent is to establish a basic understanding of why the web
application is built, who will use it, and what problems it will solve for its users.
A set of programs associated with the operation of a computer is called software. Software is the part
of the computer system, which enables the user to interact with several physical hardware devices.
The minimum software requirement specifications for developing this project are as follows:
Database : My SQL
The collection of internal electronic circuits and external physical devices used in building a computer
is called the Hardware. The minimum hardware requirement specifications for developing this project
are as follows:
10 | P a g e
2.2 Function Details:
The basic objective of HOTEL MANAGEMENT SYSTEM is to generalize and simplify the monthly or day
to day activities of Hotel like Room activities, Check in of New Customer, Check out of customer,
Assigning a room according to customer requirement, and finally compute the bill etc. which has to
be performed repeatedly on regular basis. To provide efficient, fast, reliable and user-friendly system
is the basic motto behind this exercise. Let us now discuss how different functions handle the structure
and data files:
1. Password:
In this module, this website is for multiple users. If a User enters a password and the software checks
its validity. If the password is valid then option is given to change the password, otherwise “Invalid
User/ Password” message is displayed. There is an option for password recovery, log out, login, new
users sign in. The Administrator can also update changes in the site after login.
This is used to add a new employee details, delete entity details and view the details. In that screen,
the automatic item is created. In this function, whenever a new entity is required to be added the
corresponding forms are opened and the database is manipulated to check whether the data is already
existing or not. If it already exists, then it prompts that “Entry already existing” and if not than the
data is entered with the various validation checks.
3.Function NEW_ROOM() :
This is the function used to open a new room for a customer so that he/she can assign a separate
room . In that screen, the automatic room number is created. After opening a new room for the
customer, finally a room is assigned to a customer and the room records are appended in the data
file.
4.Function CHECKIN_CUSTOMER():
This function is used to admit a customer in our Hotel after entering his all personal details like
Name, Address, Phone, Sex and then he/she is assigned a room from
NEW_ROOM() function.
11 | P a g e
5.Function CHECKOUT_CUSTOMER():
This function is used to checkout the customer details from database. When the user inputs his room
number, the same room number will be checked in the database, if the room number is matched in
the database, then the customer will be checkout from the database and transferred the record of the
checkout to another table of database so that the Hotel Management has the record ofcustomers who
have check-out to fulfill his legal liabilities.
6.Function GENERATE_BILL():
When any customer check-out, his/her bill is generated automatically by calculated check-out date
minus check-in date and getting multiplied it by daily room charge plus other charges and the bill has
to be saved in the table in the database.
7.Function DISPLAY_RECORD():
This function is used to display all the transaction including the customer name, address, phone, bed
number, and doctor assigned to him/her in the screen. This is a global report to display all the
transaction records in the screen.
In this function, the validity of data entered by the user during the various business processes is
checked through various validation checks. For example, there should not be any characters entered
in the numeric fields, likewise if there is any error occurs than it should handle that particular error
and give the required messages.
9: Searching:
In this function, room, customer well as members can search details from the database according to
their authentications.
12 | P a g e
10: Report Generation:
a) Customer Details.
c) Rooms Details
d) Bill Details
e) Check-in Reports
f) Booking Details
g) Online Bookings
h) Checkout Details
i) Membership Details
j) Packages Available.
Module Description
The HOTEL MANAGEMENT SYSTEM consists of 2 modules and 3 categories. The categories are as
follows:
▪ Advanced Search
▪ Booking
▪ Payment
The modules are
▪ Administrator
▪ User
Admin Module:
o The administrator should login into the system with unique his/her password and username.
o If the username and password is validated then he can gain access to the system.
13 | P a g e
o View the hotels can update and delete the hotels.
o Post the special offers, add new hotel to the hotels list.
o Insert /View the Availability and Price.
o Post the links. Adding the links to the hotels and as well view the links.
o Blocks the user view the status of the users.
o Restrict the user to the see the more information with out login.
The Administrator can do the following actions:
o Login
o Change Password
o Admin Functionalities
o View Hotels
o Add Hotels
o Post Special Offers
o Edit / Delete Hotels
o Upload Hotel Images.
o Logout
User Module:
o A new User can register with the application by entering his appropriate details.
o The User should login into the system with unique his/her password and username.
o If the username and password is validated then he can gain access to the system.
o The User can change his password, To change the password, it should ask for the old
password, new password and confirm new password.
o View the Categories.
The User can do the following actions:
o Register
o Login
o Change Password
o User Functionalities
o Advanced Search
o Booking
14 | P a g e
o Payment
o Logout
2.3.1 User Analysis:
User analysis is the process of identifying the different categories of users to the application, their
hierarchies and their functionalities.
15 | P a g e
CHAPTER THREE
SYSTEM DESIGN
A data-flow diagram (DFD) is a way of representing a flow of a data of a process or a system (usually
an information system). The DFD also provides information about the outputs and inputs of each
entity and the process itself. A data-flow diagram has no control flow, there are no decision rules and
no loops. Specific operations based on the data can be represented by a flowchart. The data-flow
diagram is part of the structured-analysis modelling tools. When using UML, the activity diagram
typically takes over the role of the data-flow diagram. A special form of data-flow plan is a site-
oriented dataflow plan.
Data Flow:
16 | P a g e
3.2 USE CASE DIAGRAMS:
A use case describes a sequence of actions that provide something of measurable value to an actor
and is drawn as a horizontal ellipse an actor is a person, organization, or external system that plays a
role in one or more interactions with your system.
A use case diagram is a diagram that shows a set of use cases and actors and relationships.
Contents
• Use cases
• Actors
Dependency, generalization and association relationships
17 | P a g e
18 | P a g e
3.3 ER DIAGRAM:
Entity – Relationship Diagram: This depicts relationship between data objects. The attribute of each
data objects noted in the entity- relationship diagram can be described using a data object description.
Data flow
1. To provide an indication of how data are transformed as they move through the system.
19 | P a g e
20 | P a g e
3.4 DATABASE DESIGN
The data for designing and implementing the schema of the database depends on properties of client
and administrator. In designing the schema for the OHBS database, four main distinct parts have been
identified and used in both user and administrator parts, and two main parts used in administrator
part for modifying the hotel information pages.
Table: checked
Column
Name Data Type Description
21 | P a g e
Column
Name Data Type Description
Table: rooms
Table: room_categories
22 | P a g e
Column Name Data Type Description
Table: system_settings
23 | P a g e
Column Name Data Type Description
Table: users
24 | P a g e
CHAPTER FOUR
IMPORTANT CODES
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<?php
session_start();
if(isset($_SESSION['login_id']))
header("location:index.php?page=home");
25 | P a g e
$query = $conn->query("SELECT * FROM system_settings limit 1")->fetch_array();
if(!is_numeric($key))
$_SESSION['setting_'.$key] = $value;
?>
</head>
<style>
body{
width: 100%;
height: calc(100%);
/*background: #007bff;*/
main#main{
width:100%;
height: calc(100%);
background:white;
#login-right{
position: absolute;
right:0;
width:40%;
height: calc(100%);
background:white;
26 | P a g e
display: flex;
align-items: center;
#login-left{
position: absolute;
left:0;
width:60%;
height: calc(100%);
background:#00000061;
display: flex;
align-items: center;
#login-right .card{
margin: auto
.logo {
margin: auto;
font-size: 8rem;
background: white;
color: #000000b3;
#login-left {
27 | P a g e
background-repeat: no-repeat;
background-size: cover;
</style>
<body>
<div id="login-left">
</div> -->
</div>
<div id="login-right">
<div class="card-body">
<div class="form-group">
</div>
28 | P a g e
<div class="form-group">
</div>
</form>
</div>
</div>
</div>
</main>
</body>
<script>
$('#login-form').submit(function(e){
e.preventDefault()
if($(this).find('.alert-danger').length > 0 )
$(this).find('.alert-danger').remove();
29 | P a g e
$.ajax({
url:'ajax.php?action=login',
method:'POST',
data:$(this).serialize(),
error:err=>{
console.log(err)
$('#login-form button[type="button"]').removeAttr('disabled').html('Login');
},
success:function(resp){
if(resp == 1){
location.href ='index.php?page=home';
location.href ='voting.php';
}else{
$('#login-form
button[type="button"]').removeAttr('disabled').html('Login');
})
})
</script>
</html>
30 | P a g e
<!DOCTYPE html>
<html lang="en">
<?php
session_start();
include('header.php');
include('admin/db_connect.php');
if(!is_numeric($key))
$_SESSION['setting_'.$key] = $value;
?>
<style>
header.masthead {
background-repeat: no-repeat;
background-size: cover;
</style>
<body id="page-top">
<!-- Navigation-->
31 | P a g e
</div>
</div>
<div class="container">
</ul>
</div>
</div>
</nav>
<?php
include $page.'.php';
?>
32 | P a g e
<div class="modal fade" id="confirm_modal" role='dialog'>
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Confirmation</h5>
</div>
<div class="modal-body">
<div id="delete_content"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
</div>
<div class="modal-body">
</div>
33 | P a g e
<div class="modal-footer">
</div>
</div>
</div>
</div>
</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body id="page-top">
34 | P a g e
<!-- Navigation-->
<div class="container">
</ul>
</div>
</div>
</nav>
<!-- Masthead-->
<header class="masthead">
35 | P a g e
<hr class="divider my-4" />
</div>
</div>
</div>
</div>
</header>
<!-- About-->
<div class="container">
<p class="text-white-50 mb-4">Start Bootstrap has everything you need to get your
new website up and running in no time! Choose one of our open source, free to download, and easy
to use themes! No strings attached!</p>
</div>
</div>
</div>
</section>
36 | P a g e
<!-- Services-->
<div class="container">
<div class="row">
<div class="mt-5">
<p class="text-muted mb-0">Our themes are updated regularly to keep them bug
free!</p>
</div>
</div>
<div class="mt-5">
</div>
</div>
<div class="mt-5">
37 | P a g e
<h3 class="h4 mb-2">Ready to Publish</h3>
<p class="text-muted mb-0">You can use this design as is, or you can make
changes!</p>
</div>
</div>
<div class="mt-5">
<p class="text-muted mb-0">Is it really open source if it's not made with love?</p>
</div>
</div>
</div>
</div>
</section>
<!-- Portfolio-->
<div id="portfolio">
<div class="portfolio-box-caption">
38 | P a g e
</div>
</a>
</div>
<div class="portfolio-box-caption">
</div>
</a>
</div>
<div class="portfolio-box-caption">
</div>
</a>
</div>
<div class="portfolio-box-caption">
39 | P a g e
<div class="project-category text-white-50">Category</div>
</div>
</a>
</div>
<div class="portfolio-box-caption">
</div>
</a>
</div>
</div>
</a>
</div>
</div>
</div>
40 | P a g e
</div>
</div>
</section>
<!-- Contact-->
<div class="container">
<p class="text-muted mb-5">Ready to start your next project with us? Give us a call or
send us an email and we will get back to you as soon as possible!</p>
</div>
</div>
<div class="row">
</div>
41 | P a g e
<div class="col-lg-4 mr-auto text-center">
<!-- Make sure to change the email address in BOTH the anchor text and the link target
below!-->
<a class="d-block"
href="mailto:[email protected]">[email protected]</a>
</div>
</div>
</div>
</section>
<!-- Footer-->
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-
easing/1.4.1/jquery.easing.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-
popup.min.js"></script>
<script src="js/scripts.js"></script>
</body>
42 | P a g e
</html>
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
SET AUTOCOMMIT = 0;
START TRANSACTION;
--
-- Database: `sourcecodester_hoteldb`
--
43 | P a g e
-- --------------------------------------------------------
--
--
`email` text,
-- --------------------------------------------------------
--
--
44 | P a g e
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
--
-- --------------------------------------------------------
--
--
`news` text
--
--
45 | P a g e
INSERT INTO `newsletterlog` (`id`, `title`, `subject`, `news`) VALUES
-- --------------------------------------------------------
--
--
46 | P a g e
`noofdays` int(11) DEFAULT NULL
--
--
INSERT INTO `payment` (`id`, `title`, `fname`, `lname`, `troom`, `tbed`, `nroom`, `cin`, `cout`, `ttot`,
`fintot`, `mepr`, `meal`, `btot`, `noofdays`) VALUES
(2, 'Dr.', 'janobe', 'janobe', 'Superior Room', 'Single', 1, '2020-10-10', '2020-10-11', 320.00, 323.20,
0.00, 'Room only', 3.20, 1);
-- --------------------------------------------------------
--
--
47 | P a g e
--
--
-- --------------------------------------------------------
--
48 | P a g e
-- Table structure for table `roombook`
--
`FName` text,
`LName` text,
`Phone` text,
--
--
49 | P a g e
--
--
--
--
--
--
--
--
50 | P a g e
--
--
--
--
--
--
--
--
--
--
51 | P a g e
ALTER TABLE `newsletterlog`
--
--
--
--
COMMIT;
<?php
include('db.php')
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
52 | P a g e
<meta charset="utf-8" />
</head>
<body>
<div id="wrapper">
<div class="sidebar-collapse">
<li>
</li>
</ul>
</div>
53 | P a g e
</nav>
<div id="page-inner">
<div class="row">
<div class="col-md-12">
<h1 class="page-header">
RESERVATION <small></small>
</h1>
</div>
</div>
<div class="row">
<div class="panel-heading">
PERSONAL INFORMATION
</div>
<div class="panel-body">
<div class="form-group">
<label>Title*</label>
54 | P a g e
<select name="title" class="form-control" required >
<option value="Dr.">Dr.</option>
<option value="Miss.">Miss.</option>
<option value="Mr.">Mr.</option>
<option value="Mrs.">Mrs.</option>
<option value="Prof.">Prof.</option>
</select>
</div>
<div class="form-group">
<label>First Name</label>
</div>
<div class="form-group">
<label>Last Name</label>
</div>
<div class="form-group">
55 | P a g e
<label>Email</label>
</div>
<div class="form-group">
<label>Nationality*</label>
<label class="radio-inline">
</label>
<label class="radio-inline">
</label>
</div>
<?php
$countries = array("Afghanistan",
"Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and
Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas",
"Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan",
"Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean
Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon",
"Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China",
"Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the
Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)",
"Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East
56 | P a g e
Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia",
"Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan",
"French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia",
"Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam",
"Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy
See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran
(Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan",
"Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait",
"Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan
Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former
Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall
Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated
States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco",
"Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles",
"New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island",
"Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New
Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar",
"Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint
Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia",
"Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia",
"Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands",
"Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan
Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of
China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga",
"Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu",
"Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States
Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin
Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen",
"Yugoslavia", "Zambia", "Zimbabwe");
?>
<div class="form-group">
<label>Passport Country*</label>
57 | P a g e
<select name="country" class="form-control" required>
<?php
endforeach;
?>
</select>
</div>
<div class="form-group">
<label>Phone Number</label>
</div>
</div>
</div>
</div>
<div class="row">
58 | P a g e
<div class="col-md-6 col-sm-6">
<div class="panel-heading">
RESERVATION INFORMATION
</div>
<div class="panel-body">
<div class="form-group">
</select>
</div>
<div class="form-group">
<label>Bedding Type</label>
<option value="Single">Single</option>
<option value="Double">Double</option>
59 | P a g e
<option value="Triple">Triple</option>
<option value="Quad">Quad</option>
<option value="None">None</option>
</select>
</div>
<div class="form-group">
<option value="1">1</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
60 | P a g e
</div>
<div class="form-group">
<label>Meal Plan</label>
<option value="Breakfast">Breakfast</option>
</select>
</div>
<div class="form-group">
<label>Check-In</label>
</div>
<div class="form-group">
<label>Check-Out</label>
61 | P a g e
<input name="cout" type ="date" class="form-control">
</div>
</div>
</div>
</div>
<div class="well">
<h4>HUMAN VERIFICATION</h4>
<?php
if(isset($_POST['submit']))
$code1=$_POST['code1'];
$code=$_POST['code'];
62 | P a g e
if($code1!="$code")
$msg="Invalide code";
else
//
$con=mysqli_connect("localhost","root","","hotel");
$check="SELECT * FROM
roombook WHERE email = '$_POST[email]'";
$rs =
mysqli_query($con,$check);
$data =
mysqli_fetch_array($rs, MYSQLI_NUM);
if($data[0] > 1) {
echo "<script
type='text/javascript'> alert('User Already in Exists')</script>";
else
$new ="Not
Conform";
$newUser="INSERT
INTO `roombook`(`Title`, `FName`, `LName`, `Email`, `National`, `Country`, `Phone`, `TRoom`, `Bed`,
63 | P a g e
`NRoom`, `Meal`, `cin`, `cout`,`stat`,`nodays`) VALUES
('$_POST[title]','$_POST[fname]','$_POST[lname]','$_POST[email]','$_POST[nation]','$_POST[country
]','$_POST[phone]','$_POST[troom]','$_POST[bed]','$_POST[nroom]','$_POST[meal]','$_POST[cin]','$
_POST[cout]','$new',datediff('$_POST[cout]','$_POST[cin]'))";
if
(mysqli_query($con,$newUser))
echo
"<script type='text/javascript'> alert('Your Booking application has been sent')</script>";
else
echo
"<script type='text/javascript'> alert('Error adding user in database')</script>";
?>
</form>
</div>
</div>
64 | P a g e
</div>
</div>
</div>
</div>
</div>
<!-- JS Scripts-->
<script src="assets/js/jquery-1.10.2.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.metisMenu.js"></script>
<script src="assets/js/custom-scripts.js"></script>
</body>
65 | P a g e
</html>
<?php
?>
66 | P a g e
CHAPTER FIVE
IMPLEMENTATION
PHP is a widely used, general-purpose scripting language that was originally designed for web
development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML
source document and interpreted by a web server with a PHP processor module, which generates the
web page document.
PHP Advantages
PHP source code is compiled on-the-fly to an internal format that can be executed by the PHP engine.
In order to speed up execution time and not have to compile the PHP source code every time the
webpage is accessed, PHP scripts can also be deployed in executable format using a PHP compiler.
PHP is one of the most popular server side scripting languages running today. It is used for creating
dynamic webpages that interact with the user offering customized information. PHP offers many
advantages; it is fast, stable, secure, easy to use and open source (free).
PHP code is inserted directly into the HTML that makes up a website. When a visitor comes to the
website, the code is executed. Because PHP is a server side technology, the user does not need any
special browser or plug-ins to see the PHP in action.
The beauty of PHP lies in its simplicity. It is easy to understand and learn, especially for those with
backgrounds in programming such as C, javascript and HTML. The language is similar to C and Perl so
that anyone with a background in either C or Perl programming will feel comfortable using and
understanding PHP. PHP also runs on just about every platform including most UNIX, Macs and
Windows versions.
Another key advantage of PHP is its connective abilities. PHP uses a modular system of extensions to
interface with a variety of libraries such as graphics, XML, encryption, etc. In addition, programmers
can extend PHP by writing their own extensions and compiling them into the executable or they can
create their own executable and load it using PHP's dynamic loading mechanism.
A huge advantage that PHP offers is its community. Since PHP is an A huge advantage that PHP offers
is its community. Since PHP is an open source project, the PHP community is willing to share. If you're
67 | P a g e
looking for a particular script, chances are another user has already created something similar. Check
within the PHP community for availability. Likewise, if you have created a function that others might
enjoy, be sure to post the code for others.
A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed
anywhere in the document.
On servers with shorthand support enabled you can start a scripting block with <? and end with ?>.
For maximum compatibility, we recommend that you use the standard form <?php) rather than the
shorthand form.
<?php
?>
A PHP file normally contains HTML tags, just like an HTML file, and some PHP scripting code.
Below, we have an example of a simple PHP script which sends the text "Hello World" to the browser:
<html>
<body>
<?php
?>
</body>
</html>
Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to
distinguish one set of instructions from another. There are two basic statements to output text with
PHP: echo and print. In the example above we have used the echo statement to output the text
"Hello World".
Note: The file must have a .php extension. If the file has a .html extension, the PHP code will not be
executed.
68 | P a g e
Comments in PHP
In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.
<html>
<body>
<?php
//This is a comment
/*
This is
a comment
block
*/
?>
</body>
</html>
Variables in PHP
Variables are used for storing a values, like text strings, numbers or arrays. When a variable is
declared, it can be used over and over again in your script.
$var_name = value;
In PHP, a variable does not need to be declared before adding a value to it.
69 | P a g e
In the example above, you see that you do not have to tell PHP which data type the variable is.
PHP automatically converts the variable to the correct data type, depending on its value.
In a strongly typed programming language, you have to declare (define) the type and name of the
variable before using it.
5.2 Sessions
A PHP session variable is used to store information about, or change settings for a user session. Session
variables hold information about one single user, and are available to all pages in one application.
When you are working with an application, you open it, do some changes and then you close it. This
is much like a Session. The computer knows who you are. It knows when you start the application
and when you end. But on the internet there is one problem: the web server does not know who
you are and what you do because the HTTP address doesn't maintain state.
A PHP session solves this problem by allowing you to store user information on the server for later
use (i.e. username, shopping items, etc). However, session information is temporary and will be
deleted after the user has left the website. If you need a permanent storage you may want to store
the data in a database.
Sessions work by creating a unique id (UID) for each visitor and store variables based on this UID.
The UID is either stored in a cookie or is propagated in the URL.
Before you can store user information in your PHP session, you must first start up the session.
Note: The session_start() function must appear BEFORE the <html> tag: <?php session_start(); ?>
<html>
<body>
</body>
</html>
70 | P a g e
The code above will register the user's session with the server, allow you to
start saving user information, and assign a UID for that user's session.
The correct way to store and retrieve session variables is to use the PHP
$_SESSION variable:
<?php
session_start();
35
$_SESSION['views']=1;
?>
<html>
<body>
<?php
?>
</body>
</html>
Output:
Pageviews=1
In the example below, we create a simple page-views counter. The isset() function checks if the
"views" variable has already been set. If "views" has been set, we can increment our counter. If
"views" doesn't exist, we create a "views" variable, and set it to 1:
<?php
71 | P a g e
session_start();
if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else
$_SESSION['views']=1;
?>
Destroying a Session
If you wish to delete some session data, you can use the unset() or the session_destroy() function.
<?php
unset($_SESSION['views']);
?>
You can also completely destroy the session by calling the session_destroy() function:
Note: session_destroy() will reset your session and you will lose all your stored session data.
The most important thing to notice when dealing with HTML forms and PHP is that any form
element in an HTML page will automatically be available to your PHP scripts.
Example
The example below contains an HTML form with two input fields and a
submit button:
<html>
<body>
72 | P a g e
Name: <input type="text" name="fname" />
</form>
</body>
</html>
Welcome Sam!
The PHP $_GET and $_POST variables are used to retrieve information
When a user fills out the form above and click on the submit button, the
<html>
<body>
The PHP $_GET and $_POST variables are used to retrieve information
When a user fills out the form above and click on the submit button, the
<html>
<body>
73 | P a g e
</body>
</html>
Welcome Sam!
The PHP $_GET and $_POST functions will be explained in the next chapters.
Form Validation
User input should be validated on the browser whenever possible (by client scripts). Browser
validation is faster and reduces the server load. You should consider server validation if the user
input will be inserted into a database. A good way to validate a form on the server is to post the
form to itself, instead of jumping to a different page. The user will then get the error messages on
the same page as the form. This makes it easier to discover the error.
74 | P a g e
CHAPTER SIX
OUTPUT SCREENS
75 | P a g e
76 | P a g e
CHAPTER SEVEN
PROBLEM STATEMENT
The old manual system was suffering from a series of drawback. Since whole of the system was to be
maintained with hands the process of keeping, maintaining and retrieving the information was very
tedioys and lengthy. The records were never used to be a systematic order there used to be lots of
difficulties in associating any particular transaction with a particular context. If any information was
to be found it was required to go through the different registers, documents there would never exit
anything like report generation. There would always be unnecessary consumption of time while
entering records and retrieving records. Once the records were entered it was very difficult to
update these records.
Advantages:
• Sometimes it happens that the rooms get booked soon when one visits the place therefore
user can make advance booking using this system.
• It saves user time in search of rooms.
• The system is useful as it calculates an exact cost for requested number of days.
• It saves organization resources and expenses.
• This system is effective and saves time and cost of users.
• Easy registration.
Disadvantages:
• The booking process usually requires a customer identity which the system cannot detect.
• It requires a reliable internet connection.
77 | P a g e
Applications:
78 | P a g e
CHAPTER EIGHT
CONCLUSION
This system is developed for the exclusively for the people . It provides facilities to the user with user
friendly modules with sub modules. This system is developed in understandable approach which can
be easier to the layman of the computers. This system is developed totally GUI based and with smart
links.
This project is designed to meet the requirements of Online Hotel Management. It has been developed
in JSP, Servlets keeping in mind the specifications of the system. For designing the system we have
used simple data flow diagrams.
Overall the project teaches us the essential skills like: Using system analysis and design techniques like
data flow diagram in designing the system. Understanding the database handling and query
processing.
79 | P a g e
CHAPTER NINE
REFERENCES
• https://www.w3schools.com/html
• https://www.w3.org/style/css
• https://wikepedia.or/wiki/MySQL
• https://wikipedia.org/wiki/javascript
• https://httpd.apache.org
• https://w3schools.com/php
• Learning PHP, MySQL & JavaScript: With jQuery, CSS & HTML
• Java: The Complete Reference: Herbert Schildt
80 | P a g e