0% found this document useful (0 votes)
24 views80 pages

Biswaaaproject

The project report details the development of an 'Online Hotel Booking System' aimed at streamlining hotel management and enhancing user experience for both guests and staff. It includes features like real-time room availability, reservation management, secure online transactions, and comprehensive reporting tools. The system is designed to improve operational efficiency, reduce errors, and enhance guest satisfaction in hotel booking operations.

Uploaded by

maharanabiswa53
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views80 pages

Biswaaaproject

The project report details the development of an 'Online Hotel Booking System' aimed at streamlining hotel management and enhancing user experience for both guests and staff. It includes features like real-time room availability, reservation management, secure online transactions, and comprehensive reporting tools. The system is designed to improve operational efficiency, reduce errors, and enhance guest satisfaction in hotel booking operations.

Uploaded by

maharanabiswa53
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 80

A

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

Under the supervision Of


Prof. Subhasish Mohanty

GITA AUTONOMOUS COLLEGE


BHUBANESWAR
JULY 2023

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.

Prof. Subhasish Mohanty


(Supervisor)
Prof. (Dr.) Deepti Bala Mishra
(HoD, Dept. of MCA)

Examined by:

(External Supervisor)

2|Page
GITA AUTONOMOUS COLLEGE, BHUBANESWAR
Department of Master of Computer Application

ACKNOWLEDGEMENT

I express my gratitude to Prof. Subhasish Mohanty, Project supervisor


for her guidance and constant support.

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.

Date: Biswanath Maharana


Bhubaneswar Roll No: 21MC025

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

S. No. CONTENTS PAGE NO.

1. INTRODUCTION 7-9

• PROJECT PURPOSE
• PROJECT SCOPE

2. SYSTEM ANALYSIS 8-15

• SOFTWARE REQUIREMENTS
• HARDWARE REQUIREMENTS
• FUNCTION DETAILS
• FUNCTIONAL REQUIREMENTS
3. SYSTEM DESIGN 16-25

• DATA FLOW DIAGRAMS


• USE CASE DIAGRAMS
• E-R DIAGRAMS
• DATABASE DESIGN

4.IMPORTANT CODES 25-66

5. IMPLEMENTATION 67-74

6. OUTPUT SCREENS 75-76

7. PROBLEM STATEMENT 77-78

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

Administrator – Administrator can add / edit and manage administrator accounts.

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

1.2.1 Existing System with Limitations:

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 .

1.2.2 Proposed System Features:

▪ 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.

2.1 Software requirement Specification:

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:

Operating System : Windows XP/Vista/2000, Linux.

Presentation layer : PHP, CSS, HTML, JSP, FLASH

Database : My SQL

Presentation : Power Point 2003

Documentation Tools : Ms Office

2.1 Hardware Requirement Specification:

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:

Processor : Standard processor with a speed of 1.6 GHz

RAM : 256 MB RAM or more

Hard Disk : 20 GB or more

Monitor : Standard color monitor

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.

2. Creating new Entity (Hotel, Room, Customers,Members etc.) :

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.

8: Validation of Data Entered by the User & Error Handling:

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:

In this function reports are generated for the following entities:

a) Customer Details.

b) Requirements of the Customers

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.

2.3 Functional Requirements

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:

The Functionalities of the Administrator is:

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:

The Functionalities of the User is:

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

3.1 DATA FLOW DIAGRAM (DFD):

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:

There are three types of DFD’s they are

• Context Level DFD


• Top Level DFD and
• Detailed Level DFD

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.

Use Case Diagram

A use case diagram is a diagram that shows a set of use cases and actors and relationships.

Contents

Use case commonly contain

• 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

diagram serves two purposes:

1. To provide an indication of how data are transformed as they move through the system.

2. To depict the functions that transformation the data flow.

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

id int(30) Primary key

ref_no varchar(100) Not null

room_id int(30) Not null

name text Not null

contact_no varchar(20) Not null

date_in datetime Not null

date_out datetime Not null

booked_cid int(30) Not null

21 | P a g e
Column
Name Data Type Description

Not null, default: 0 (0=pending, 1=checked in, 2=checked


status tinyint(1) out)

date_updated datetime Not null, default: current timestamp

Table: rooms

Column Name Data Type Description

id int(30) Primary key

room varchar(30) Not null

category_id int(30) Not null

status tinyint(1) Not null, default: 0 (0=Available, 1=Unavailable)

Table: room_categories

22 | P a g e
Column Name Data Type Description

id int(30) Primary key

name text Not null

price float Not null

cover_img text Not null

Table: system_settings

Column Name Data Type Description

id int(30) Primary key

hotel_name text Not null

email varchar(200) Not null

contact varchar(20) Not null

cover_img text Not null

23 | P a g e
Column Name Data Type Description

about_content text Not null

Table: users

Column Name Data Type Description

id int(30) Primary key

name varchar(200) Not null

username varchar(100) Not null

password varchar(200) Not null

type tinyint(1) Not null, default: 2 (1=admin, 2=staff)

24 | P a g e
CHAPTER FOUR

IMPORTANT CODES

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta content="width=device-width, initial-scale=1.0" name="viewport">

<title>Admin | Hotel Management System</title>

<?php include('./header.php'); ?>

<?php include('./db_connect.php'); ?>

<?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();

foreach ($query as $key => $value) {

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;

padding: .5em 0.8em;

border-radius: 50% 50%;

color: #000000b3;

#login-left {

background: url(../assets/img/<?php echo $_SESSION['setting_cover_img'] ?>);

27 | P a g e
background-repeat: no-repeat;

background-size: cover;

</style>

<body>

<main id="main" class=" alert-info">

<div id="login-left">

<!-- == You can logo or image herre == -->

<!-- <div class="logo">

<i class="fa fa-poll-h"></i>

</div> -->

</div>

<div id="login-right">

<div class="card col-md-8">

<div class="card-body">

<form id="login-form" >

<div class="form-group">

<label for="username" class="control-


label">Username</label>

<input type="text" id="username"


name="username" class="form-control">

</div>

28 | P a g e
<div class="form-group">

<label for="password" class="control-


label">Password</label>

<input type="password" id="password"


name="password" class="form-control">

</div>

<center><button class="btn-sm btn-block btn-wave


col-md-4 btn-primary">Login</button></center>

</form>

</div>

</div>

</div>

</main>

<a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>

</body>

<script>

$('#login-form').submit(function(e){

e.preventDefault()

$('#login-form button[type="button"]').attr('disabled',true).html('Logging in...');

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';

}else if(resp == 2){

location.href ='voting.php';

}else{

$('#login-form').prepend('<div class="alert alert-


danger">Username or password is incorrect.</div>')

$('#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');

$query = $conn->query("SELECT * FROM system_settings limit 1")->fetch_array();

foreach ($query as $key => $value) {

if(!is_numeric($key))

$_SESSION['setting_'.$key] = $value;

?>

<style>

header.masthead {

background: url(assets/img/<?php echo $_SESSION['setting_cover_img'] ?>);

background-repeat: no-repeat;

background-size: cover;

</style>

<body id="page-top">

<!-- Navigation-->

<div class="toast" id="alert_toast" role="alert" aria-live="assertive" aria-atomic="true">

<div class="toast-body text-white">

31 | P a g e
</div>

</div>

<nav class="navbar navbar-expand-lg navbar-light fixed-top py-3" id="mainNav">

<div class="container">

<a class="navbar-brand js-scroll-trigger" href="./"><?php echo


$_SESSION['setting_hotel_name'] ?></a>

<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"


data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-
label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>

<div class="collapse navbar-collapse" id="navbarResponsive">

<ul class="navbar-nav ml-auto my-2 my-lg-0">

<li class="nav-item"><a class="nav-link js-scroll-trigger"


href="index.php?page=home">Home</a></li>

<li class="nav-item"><a class="nav-link js-scroll-trigger"


href="index.php?page=list">Rooms</a></li>

<li class="nav-item"><a class="nav-link js-scroll-trigger"


href="index.php?page=about">About</a></li>

</ul>

</div>

</div>

</nav>

<?php

$page = isset($_GET['page']) ?$_GET['page'] : "home";

include $page.'.php';

?>

32 | P a g e
<div class="modal fade" id="confirm_modal" role='dialog'>

<div class="modal-dialog modal-md" role="document">

<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">

<button type="button" class="btn btn-primary" id='confirm' onclick="">Continue</button>

<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>

</div>

</div>

</div>

</div>

<div class="modal fade" id="uni_modal" role='dialog'>

<div class="modal-dialog modal-md" role="document">

<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">

<button type="button" class="btn btn-primary" id='submit' onclick="$('#uni_modal


form').submit()">Save</button>

<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>

</div>

</div>

</div>

</div>

<footer class="bg-light py-5">

<div class="container"><div class="small text-center text-muted">Hotel Mangement system |


<a href="https://1sourcecodr.blogspot.com/" target="_blank">1 SOURCE CODE</a></div></div>

</footer>

<?php include('footer.php') ?>

</body>

<?php $conn->close() ?>

</html>

<!DOCTYPE html>

<html lang="en">

<head>

</head>

<body id="page-top">

34 | P a g e
<!-- Navigation-->

<nav class="navbar navbar-expand-lg navbar-light fixed-top py-3" id="mainNav">

<div class="container">

<a class="navbar-brand js-scroll-trigger" href="#page-top">Start Bootstrap</a>

<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"


data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-
label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>

<div class="collapse navbar-collapse" id="navbarResponsive">

<ul class="navbar-nav ml-auto my-2 my-lg-0">

<li class="nav-item"><a class="nav-link js-scroll-trigger" href="#about">About</a></li>

<li class="nav-item"><a class="nav-link js-scroll-trigger"


href="#services">Services</a></li>

<li class="nav-item"><a class="nav-link js-scroll-trigger"


href="#portfolio">Portfolio</a></li>

<li class="nav-item"><a class="nav-link js-scroll-trigger"


href="#contact">Contact</a></li>

</ul>

</div>

</div>

</nav>

<!-- Masthead-->

<header class="masthead">

<div class="container h-100">

<div class="row h-100 align-items-center justify-content-center text-center">

<div class="col-lg-10 align-self-end">

<h1 class="text-uppercase text-white font-weight-bold">Your Favorite Source of Free


Bootstrap Themes</h1>

35 | P a g e
<hr class="divider my-4" />

</div>

<div class="col-lg-8 align-self-baseline">

<p class="text-white-75 font-weight-light mb-5">Start Bootstrap can help you build


better websites using the Bootstrap framework! Just download a theme and start customizing, no
strings attached!</p>

<a class="btn btn-primary btn-xl js-scroll-trigger" href="#about">Find Out More</a>

</div>

</div>

</div>

</header>

<!-- About-->

<section class="page-section bg-primary" id="about">

<div class="container">

<div class="row justify-content-center">

<div class="col-lg-8 text-center">

<h2 class="text-white mt-0">We've got what you need!</h2>

<hr class="divider light my-4" />

<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>

<a class="btn btn-light btn-xl js-scroll-trigger" href="#services">Get Started!</a>

</div>

</div>

</div>

</section>

36 | P a g e
<!-- Services-->

<section class="page-section" id="services">

<div class="container">

<h2 class="text-center mt-0">At Your Service</h2>

<hr class="divider my-4" />

<div class="row">

<div class="col-lg-3 col-md-6 text-center">

<div class="mt-5">

<i class="fas fa-4x fa-gem text-primary mb-4"></i>

<h3 class="h4 mb-2">Sturdy Themes</h3>

<p class="text-muted mb-0">Our themes are updated regularly to keep them bug
free!</p>

</div>

</div>

<div class="col-lg-3 col-md-6 text-center">

<div class="mt-5">

<i class="fas fa-4x fa-laptop-code text-primary mb-4"></i>

<h3 class="h4 mb-2">Up to Date</h3>

<p class="text-muted mb-0">All dependencies are kept current to keep things


fresh.</p>

</div>

</div>

<div class="col-lg-3 col-md-6 text-center">

<div class="mt-5">

<i class="fas fa-4x fa-globe text-primary mb-4"></i>

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="col-lg-3 col-md-6 text-center">

<div class="mt-5">

<i class="fas fa-4x fa-heart text-primary mb-4"></i>

<h3 class="h4 mb-2">Made with Love</h3>

<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="container-fluid p-0">

<div class="row no-gutters">

<div class="col-lg-4 col-sm-6">

<a class="portfolio-box" href="assets/img/portfolio/fullsize/1.jpg">

<img class="img-fluid" src="assets/img/portfolio/thumbnails/1.jpg" alt="" />

<div class="portfolio-box-caption">

<div class="project-category text-white-50">Category</div>

<div class="project-name">Project Name</div>

38 | P a g e
</div>

</a>

</div>

<div class="col-lg-4 col-sm-6">

<a class="portfolio-box" href="assets/img/portfolio/fullsize/2.jpg">

<img class="img-fluid" src="assets/img/portfolio/thumbnails/2.jpg" alt="" />

<div class="portfolio-box-caption">

<div class="project-category text-white-50">Category</div>

<div class="project-name">Project Name</div>

</div>

</a>

</div>

<div class="col-lg-4 col-sm-6">

<a class="portfolio-box" href="assets/img/portfolio/fullsize/3.jpg">

<img class="img-fluid" src="assets/img/portfolio/thumbnails/3.jpg" alt="" />

<div class="portfolio-box-caption">

<div class="project-category text-white-50">Category</div>

<div class="project-name">Project Name</div>

</div>

</a>

</div>

<div class="col-lg-4 col-sm-6">

<a class="portfolio-box" href="assets/img/portfolio/fullsize/4.jpg">

<img class="img-fluid" src="assets/img/portfolio/thumbnails/4.jpg" alt="" />

<div class="portfolio-box-caption">

39 | P a g e
<div class="project-category text-white-50">Category</div>

<div class="project-name">Project Name</div>

</div>

</a>

</div>

<div class="col-lg-4 col-sm-6">

<a class="portfolio-box" href="assets/img/portfolio/fullsize/5.jpg">

<img class="img-fluid" src="assets/img/portfolio/thumbnails/5.jpg" alt="" />

<div class="portfolio-box-caption">

<div class="project-category text-white-50">Category</div>

<div class="project-name">Project Name</div>

</div>

</a>

</div>

<div class="col-lg-4 col-sm-6">

<a class="portfolio-box" href="assets/img/portfolio/fullsize/6.jpg">

<img class="img-fluid" src="assets/img/portfolio/thumbnails/6.jpg" alt="" />

<div class="portfolio-box-caption p-3">

<div class="project-category text-white-50">Category</div>

<div class="project-name">Project Name</div>

</div>

</a>

</div>

</div>

</div>

40 | P a g e
</div>

<!-- Call to action-->

<section class="page-section bg-dark text-white">

<div class="container text-center">

<h2 class="mb-4">Free Download at Start Bootstrap!</h2>

<a class="btn btn-light btn-xl"


href="https://startbootstrap.com/themes/creative/">Download Now!</a>

</div>

</section>

<!-- Contact-->

<section class="page-section" id="contact">

<div class="container">

<div class="row justify-content-center">

<div class="col-lg-8 text-center">

<h2 class="mt-0">Let's Get In Touch!</h2>

<hr class="divider my-4" />

<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 class="col-lg-4 ml-auto text-center mb-5 mb-lg-0">

<i class="fas fa-phone fa-3x mb-3 text-muted"></i>

<div>+1 (555) 123-4567</div>

</div>

41 | P a g e
<div class="col-lg-4 mr-auto text-center">

<i class="fas fa-envelope fa-3x mb-3 text-muted"></i>

<!-- 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 class="bg-light py-5">

<div class="container"><div class="small text-center text-muted">Copyright © 2020 - Start


Bootstrap</div></div>

</footer>

<!-- Bootstrap core JS-->

<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>

<!-- Third party plugin JS-->

<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>

<!-- Core theme JS-->

<script src="js/scripts.js"></script>

</body>

42 | P a g e
</html>

-- phpMyAdmin SQL Dump

-- version 4.8.4

-- https://www.phpmyadmin.net/

--

-- Host: 127.0.0.1

-- Generation Time: Oct 10, 2020 at 06:23 AM

-- Server version: 10.1.37-MariaDB

-- PHP Version: 5.6.39

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";

SET AUTOCOMMIT = 0;

START TRANSACTION;

SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8mb4 */;

--

-- Database: `sourcecodester_hoteldb`

--

43 | P a g e
-- --------------------------------------------------------

--

-- Table structure for table `contact`

--

CREATE TABLE `contact` (

`id` int(10) UNSIGNED NOT NULL,

`fullname` varchar(100) DEFAULT NULL,

`phoneno` int(10) DEFAULT NULL,

`email` text,

`cdate` date DEFAULT NULL,

`approval` varchar(12) DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--

-- Table structure for table `login`

--

CREATE TABLE `login` (

`id` int(10) UNSIGNED NOT NULL,

`usname` varchar(30) DEFAULT NULL,

`pass` varchar(30) DEFAULT NULL

44 | P a g e
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `login`

--

INSERT INTO `login` (`id`, `usname`, `pass`) VALUES

(1, 'janobe', 'janobe');

-- --------------------------------------------------------

--

-- Table structure for table `newsletterlog`

--

CREATE TABLE `newsletterlog` (

`id` int(10) UNSIGNED NOT NULL,

`title` varchar(52) DEFAULT NULL,

`subject` varchar(100) DEFAULT NULL,

`news` text

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `newsletterlog`

--

45 | P a g e
INSERT INTO `newsletterlog` (`id`, `title`, `subject`, `news`) VALUES

(1, 'asd', 'Send me an Email', 'asd');

-- --------------------------------------------------------

--

-- Table structure for table `payment`

--

CREATE TABLE `payment` (

`id` int(11) DEFAULT NULL,

`title` varchar(5) DEFAULT NULL,

`fname` varchar(30) DEFAULT NULL,

`lname` varchar(30) DEFAULT NULL,

`troom` varchar(30) DEFAULT NULL,

`tbed` varchar(30) DEFAULT NULL,

`nroom` int(11) DEFAULT NULL,

`cin` date DEFAULT NULL,

`cout` date DEFAULT NULL,

`ttot` double(8,2) DEFAULT NULL,

`fintot` double(8,2) DEFAULT NULL,

`mepr` double(8,2) DEFAULT NULL,

`meal` varchar(30) DEFAULT NULL,

`btot` double(8,2) DEFAULT NULL,

46 | P a g e
`noofdays` int(11) DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `payment`

--

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);

-- --------------------------------------------------------

--

-- Table structure for table `room`

--

CREATE TABLE `room` (

`id` int(10) UNSIGNED NOT NULL,

`type` varchar(15) DEFAULT NULL,

`bedding` varchar(10) DEFAULT NULL,

`place` varchar(10) DEFAULT NULL,

`cusid` int(11) DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

47 | P a g e
--

-- Dumping data for table `room`

--

INSERT INTO `room` (`id`, `type`, `bedding`, `place`, `cusid`) VALUES

(1, 'Superior Room', 'Single', 'Free', 0),

(2, 'Superior Room', 'Double', 'Free', NULL),

(3, 'Superior Room', 'Triple', 'Free', NULL),

(4, 'Single Room', 'Quad', 'Free', NULL),

(5, 'Superior Room', 'Quad', 'Free', NULL),

(6, 'Deluxe Room', 'Single', 'Free', NULL),

(7, 'Deluxe Room', 'Double', 'Free', NULL),

(8, 'Deluxe Room', 'Triple', 'Free', NULL),

(9, 'Deluxe Room', 'Quad', 'Free', NULL),

(10, 'Guest House', 'Single', 'Free', NULL),

(11, 'Guest House', 'Double', 'Free', NULL),

(12, 'Guest House', 'Quad', 'Free', NULL),

(13, 'Single Room', 'Single', 'Free', NULL),

(14, 'Single Room', 'Double', 'Free', NULL),

(15, 'Single Room', 'Triple', 'Free', NULL);

-- --------------------------------------------------------

--

48 | P a g e
-- Table structure for table `roombook`

--

CREATE TABLE `roombook` (

`id` int(10) UNSIGNED NOT NULL,

`Title` varchar(5) DEFAULT NULL,

`FName` text,

`LName` text,

`Email` varchar(50) DEFAULT NULL,

`National` varchar(30) DEFAULT NULL,

`Country` varchar(30) DEFAULT NULL,

`Phone` text,

`TRoom` varchar(20) DEFAULT NULL,

`Bed` varchar(10) DEFAULT NULL,

`NRoom` varchar(2) DEFAULT NULL,

`Meal` varchar(15) DEFAULT NULL,

`cin` date DEFAULT NULL,

`cout` date DEFAULT NULL,

`stat` varchar(15) DEFAULT NULL,

`nodays` int(11) DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Indexes for dumped tables

--

49 | P a g e
--

-- Indexes for table `contact`

--

ALTER TABLE `contact`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `login`

--

ALTER TABLE `login`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `newsletterlog`

--

ALTER TABLE `newsletterlog`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `room`

--

ALTER TABLE `room`

ADD PRIMARY KEY (`id`);

50 | P a g e
--

-- Indexes for table `roombook`

--

ALTER TABLE `roombook`

ADD PRIMARY KEY (`id`);

--

-- AUTO_INCREMENT for dumped tables

--

--

-- AUTO_INCREMENT for table `contact`

--

ALTER TABLE `contact`

MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--

-- AUTO_INCREMENT for table `login`

--

ALTER TABLE `login`

MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--

-- AUTO_INCREMENT for table `newsletterlog`

--

51 | P a g e
ALTER TABLE `newsletterlog`

MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--

-- AUTO_INCREMENT for table `room`

--

ALTER TABLE `room`

MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--

-- AUTO_INCREMENT for table `roombook`

--

ALTER TABLE `roombook`

MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

<?php

include('db.php')

?>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

52 | P a g e
<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>RESERVATION SUNRISE HOTEL</title>

<!-- Bootstrap Styles-->

<link href="assets/css/bootstrap.css" rel="stylesheet" />

<!-- FontAwesome Styles-->

<link href="assets/css/font-awesome.css" rel="stylesheet" />

<!-- Custom Styles-->

<link href="assets/css/custom-styles.css" rel="stylesheet" />

<!-- Google Fonts-->

<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />

</head>

<body>

<div id="wrapper">

<nav class="navbar-default navbar-side" role="navigation">

<div class="sidebar-collapse">

<ul class="nav" id="main-menu">

<li>

<a href="../index.php"><i class="fa fa-home"></i> Homepage</a>

</li>

</ul>

</div>

53 | P a g e
</nav>

<div id="page-wrapper" >

<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="col-md-5 col-sm-5">

<div class="panel panel-primary">

<div class="panel-heading">

PERSONAL INFORMATION

</div>

<div class="panel-body">

<form name="form" method="post">

<div class="form-group">

<label>Title*</label>

54 | P a g e
<select name="title" class="form-control" required >

<option value selected ></option>

<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>

<option value="Rev .">Rev .</option>

<option value="Rev . Fr">Rev . Fr .</option>

</select>

</div>

<div class="form-group">

<label>First Name</label>

<input name="fname" class="form-control" required>

</div>

<div class="form-group">

<label>Last Name</label>

<input name="lname" class="form-control" required>

</div>

<div class="form-group">

55 | P a g e
<label>Email</label>

<input name="email" type="email" class="form-control" required>

</div>

<div class="form-group">

<label>Nationality*</label>

<label class="radio-inline">

<input type="radio" name="nation" value="Sri Lankan" checked="">Sri


Lankan

</label>

<label class="radio-inline">

<input type="radio" name="nation" value="Non Sri Lankan ">Non Sri


Lankan

</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>

<option value selected ></option>

<?php

foreach($countries as $key => $value):

echo '<option value="'.$value.'">'.$value.'</option>'; //close your tags!!

endforeach;

?>

</select>

</div>

<div class="form-group">

<label>Phone Number</label>

<input name="phone" type ="text" class="form-control" required>

</div>

</div>

</div>

</div>

<div class="row">

58 | P a g e
<div class="col-md-6 col-sm-6">

<div class="panel panel-primary">

<div class="panel-heading">

RESERVATION INFORMATION

</div>

<div class="panel-body">

<div class="form-group">

<label>Type Of Room *</label>

<select name="troom" class="form-control" required>

<option value selected ></option>

<option value="Superior Room">SUPERIOR ROOM</option>

<option value="Deluxe Room">DELUXE ROOM</option>

<option value="Guest House">GUEST HOUSE</option>

<option value="Single Room">SINGLE ROOM</option>

</select>

</div>

<div class="form-group">

<label>Bedding Type</label>

<select name="bed" class="form-control" required>

<option value selected ></option>

<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">

<label>No.of Rooms *</label>

<select name="nroom" class="form-control" required>

<option value selected ></option>

<option value="1">1</option>

<!-- <option value="2">2</option>

<option value="3">3</option>

<option value="4">4</option>

<option value="5">5</option>

<option value="6">6</option>

<option value="7">7</option> -->

</select>

60 | P a g e
</div>

<div class="form-group">

<label>Meal Plan</label>

<select name="meal" class="form-control"required>

<option value selected ></option>

<option value="Room only">Room only</option>

<option value="Breakfast">Breakfast</option>

<option value="Half Board">Half Board</option>

<option value="Full Board">Full Board</option>

</select>

</div>

<div class="form-group">

<label>Check-In</label>

<input name="cin" type ="date" class="form-control">

</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="col-md-12 col-sm-12">

<div class="well">

<h4>HUMAN VERIFICATION</h4>

<p>Type Below this code <?php $Random_code=rand(); echo$Random_code; ?>


</p><br />

<p>Enter the random code<br /></p>

<input type="text" name="code1"


title="random code" />

<input type="hidden" name="code"


value="<?php echo $Random_code; ?>" />

<input type="submit" name="submit" class="btn


btn-primary">

<?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>";

$msg="Your code is correct";

?>

</form>

</div>

</div>

64 | P a g e
</div>

</div>

</div>

<!-- /. PAGE INNER -->

</div>

<!-- /. PAGE WRAPPER -->

</div>

<!-- /. WRAPPER -->

<!-- JS Scripts-->

<!-- jQuery Js -->

<script src="assets/js/jquery-1.10.2.js"></script>

<!-- Bootstrap Js -->

<script src="assets/js/bootstrap.min.js"></script>

<!-- Metis Menu Js -->

<script src="assets/js/jquery.metisMenu.js"></script>

<!-- Custom Js -->

<script src="assets/js/custom-scripts.js"></script>

</body>

65 | P a g e
</html>

<?php

$con = mysqli_connect("localhost","root","","sourcecodester_hoteldb") or die(mysql_error());

?>

66 | P a g e
CHAPTER FIVE

IMPLEMENTATION

5.1. PHP: Hypertext Preprocessor

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

echo "Hello World";

?>

</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.

All variables in PHP start with a $ sign symbol.

The correct way of declaring a variable in PHP:

$var_name = value;

PHP is a Loosely Typed Language

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.

In PHP, the variable is declared automatically when you use 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.

PHP Session Variables

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.

Starting a PHP Session

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.

Storing a Session Variable

The correct way to store and retrieve session variables is to use the PHP

$_SESSION variable:

<?php

session_start();

35

// store session data

$_SESSION['views']=1;

?>

<html>

<body>

<?php

//retrieve session data

echo "Pageviews=". $_SESSION['views'];

?>

</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;

echo "Views=". $_SESSION['views'];

?>

Destroying a Session

If you wish to delete some session data, you can use the unset() or the session_destroy() function.

The unset() function is used to free the specified session variable:

<?php

unset($_SESSION['views']);

?>

You can also completely destroy the session by calling the session_destroy() function:

<?php session_destroy(); ?>

Note: session_destroy() will reset your session and you will lose all your stored session data.

PHP Form Handling

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>

<form action="welcome.php" method="post">

72 | P a g e
Name: <input type="text" name="fname" />

Age: <input type="text" name="age" />

<input type="submit" />

</form>

</body>

</html>

Output could be something like this:

Welcome Sam!

You are 20 years old.

The PHP $_GET and $_POST variables are used to retrieve information

from forms, like user input.

When a user fills out the form above and click on the submit button, the

form data is sent to a PHP file, called "welcome.php":

"welcome.php" looks like this:

<html>

<body>
The PHP $_GET and $_POST variables are used to retrieve information

from forms, like user input.

When a user fills out the form above and click on the submit button, the

form data is sent to a PHP file, called "welcome.php":

"welcome.php" looks like this:

<html>

<body>

Welcome <?php echo $_POST["fname"]; ?>!<br />

You are <?php echo $_POST["age"]; ?> years old.

73 | P a g e
</body>

</html>

Output could be something like this:

Welcome Sam!

You are 20 years old.

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.

FOLLOWING POINTS SHOULD BE CONSIDERED :

- Details of the information needed for each document and report.

- The required frequency and distribution for each document.

- Probable sources of information for each document and report.

ADVANTAGES AND DISADVANTAGES

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:

This system can be applied in hotels.

It can also be implemented in resorts.

78 | P a g e
CHAPTER EIGHT

CONCLUSION

HOTEL MANAGENMENT SYSTEM is a Web-portal Development Company specializing in providing


custom solutions for small businesses. We strive to build solutions to your specific needs to get the
job done right the first time. We pay special attention to the ease of use and utilize the latest in
technology.

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

You might also like