HOTEL RESERVATION SYSTEM-final

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

A Minor Project Final Report on

HOTEL RESERVATION SYSTEM


Submitted in Partial Fulfillment of the Requirements for

the Degree of Bachelor of Engineering in Information Technology

under Pokhara University

Submitted by:
Alka Shilpakar, 15406
Anisha Maharjan, 15409

Under the supervision of


Roshan Chitrakar

Date:
12 01 2018

Department of IT Engineering
NEPAL COLLEGE OF
INFORMATION TECHNOLOGY
Balkumari, Lalitpur, Nepal.
ABSTRACT

Hotel Reservation System is a computerized hotel reservation system that is designed to provide
Everest Hotel an electronic medium to perform operations of room reservations.

The manual process of booking hotel rooms for clients is extremely tedious. Keeping track of
large customer bases and their personal details is complicated and time consuming since writing
and managing paper work is required.

This software will be designed using PHP as Server site scripting and MYSQL as its database.

The completed project delivers a system that enables the receptionist to record details of the
customer, search for unoccupied rooms as per requirements and reserve suitable rooms.

Keywords: Everest, Reservation, Search, Record, PHP, MYSQL

I
ACKNOWLEDGEMENT

The completion of our first project wouldn't have been possible without the support of our
colleagues and teachers. We would specially like to express our utmost gratitude to our project
guide ROSHAN CHITRAKAR sir for giving us this opportunity.

The proper guidelines of Roshan sir extremely helped us throughout the making of this project.
We are whole heartedly thankful to him.

Also we would like to give our gratitude and appreciation to our head of department Mr.
MADAN KADARIYA sir and our college principal Mr. NIRANJAN KHAKUREL sir for
giving us this chance to make and complete our first minor project.

II
TABLE OF CONTENTS

ABSTRACT……………………………………………………………………………………...I

ACKNOWLEDGEMENT……………………………………………………….......................II

1. INTRODUCTION…………………………………………………………...........................1

1.1 Objectives…………………………………………………………………………………2

1.2 Problem statement………………………………………………………………………..3

1.3 Significance and limitations……………………………………………………………...4

2. METHODOLOGY………………………………………………………………………….5

3. LITERATURE REVIEW…………………………………………………………………7

4. EXISTING SYSTEM………………………………………………………………………8

5. PROPOSED SYSTEM……………………………………………………………………..9

6. REQUIREMENT………………………………………………………………………….10

6.1 System Requirements Specification…………………………………………………….10

6.1.1 Functional Requirements………………………………………………………..10

6.1.2 Software Requirements…………………………………………………………10

6.1.3 Hardware Requirements………………………………………………………...11

6.1.4 Security Requirements…………………………………………………………..11

7. DESIGN AND DEVELOPMENT OF THE PROPOSED SYSTEM…………………..12

7.1 Data Structure Design…………………………………………………………………...12

7.2 Data Flow Diagram……………………………………………………………………...13

7.3 E-R Diagram…………………………………………………………………………….14

7.4 Use Case Diagram……………………………………………………………………....16

III
8. TESTING…………………………………………………………………………………..17

8.1 Unit Testing……………………………………………………………………………17

8.2 Integration Testing…………………………………………………………………….18

8.3 System Testing………………………………………………………………………...19

9. CONCLUSION…………………………………………………………………………....20

10. BIBLIOGRAPHY……………………………………………………………………….21

APPENDIX A………………………………………………………………………………..22

APPENDIX B………………………………………………………………………………..27

IV
1. INTRODUCTION

The purpose of this document is to propose a computerized hotel reservation system. Nepal is a
growing tourist destination and there has been a good rise in the number of hotels and resorts
since the past. Information and Communication Technologies (ICTs) has been rapidly
developing and commercializing for the travel and tourism industry. This has prompted hotels
and other enterprises in this sector to adopt these technologies.

Hotel Reservation System has all the dynamic versatile features required to smoothly run a hotel.
This project deals with reservation inquiry, single reservation, and group reservation, cancel
reservation and recall reservation. During reservation, the details of the customers, type of room
required and number of room required are fed in to the system. Once these in formations are
entered, the system searches for the unoccupied rooms and displays the result. In reservation
inquiry, customer can get the information such as rent of rooms and details of rooms available

Hotel operation will be easy for the receptionist since all data and information will store in the
database and it can access anytime.

1
1.1 OBJECTIVE

General Objective of the project


The main objective of our project is changing manual room reservation system into
computerized system by deeply investigating the technological problems associated with the
hotel room reservation system which would affect the existing system.

Specific objectives
 To make of searching specific data, storing and retrieving data access operations more
organized and faster.

 To reduce time to reserve the room

 To avoid clashing of reserved room

2
1.2 PROBLEM STATEMENT

 Even with the advancement in technology, maximum hotels in Nepal still use the manual
method for hotel reservations. The hotels still keep paper records in filling cabinets. It can
use up a lot of storage space.

 Many large hotels with many customers have to keep track of with regard to types of
accommodations, whether low budget, luxury, or somewhere in between, as well as
smoking or non-smoking preferences.

 Keeping track of large customer bases and all their attendant details would require an
inordinate space for file cabinets, not to mention the time employees would spend going
back and forth to file cabinets looking up each client’s information.

3
1.3 SIGNIFICANCE AND LIMITATIONS

Hotel Reservation System has all the dynamic versatile features required to efficiently run
Everest Hotel. It is a complete software suite consisting of integrated modules for various aspects
of hotel reservation.

 It offers an operational integration between reservations, guest history, reception/ front


desk.

 It has facility to generate report for analyzing customer’s booking, checking and checkout
status.

 It helps the hotel to manage booking and use the gathered data in reports to help analyze
their marketing and financial results.

The limitations of booking system is


 It may not be accessible by small restaurants.
 It won’t support languages like Spanish, Japanese etc.

4
2. METHODOLOGY

For this project, we have used the Incremental Model of Software Process Model. This model
combines linear sequential model with the iterative prototype model. The first increment is a
“core product”. The plan addresses the modification of the core product to meet the needs of the
customer and the delivery of additional features and functionality.

The process is repeated following the delivery of each increment, until the complete product is
produced.

Fig.1: Incremental Model

5
Incremental model includes the following phases:

 Analytic Phase- In this phase, the requirements of the software was analyzed which
resulted in “Software Requirement Specifications”.

 Design Phase- In this phase, analysis of the SRS was translated into the system’s design.
Context Diagram, Use-Case Diagram, ER Diagram and Class Diagram were developed.

 Coding Phase-This phase involves the coding as per the design and formation of a
working system at the end of the process.

 Testing Phase- In this phase, the system was tested. With each testing, certain changes
were made as per the suggestion. This was done in an incremental manner until a
satisfactory system was made.

6
3. LITERATURE REVIEW

 Review-There are various work performed and being performed in the hotel reservation
system. Our Hotel still uses manual hotel reservation system for servicing customers.
Thus, to overcome this problem, the system lets people check the availability of the room
in Everest Hotel of their desire.

 Domain-It is specifically designed to be used in Everest Hotel.

 Existing System-Everest Hotel has been using the traditional method of recording the
data of customers, the rooms available and check in and check out details. The
receptionist manages these details through paperwork which are stored in cabinets as
files. So, these tasks seem very time consuming, less secured and prone to errors.

 Comparison with Existing System-It has numerous advantages over the existing
process in the hotel. Our system eliminates the drawbacks of tedious manual process,
paper work, low security for personal details of customers and inability to provide rooms
according to the customer’s needs. On top of that, since the records are stored in
database, we can update, delete and add information as per requirement.

7
4. THE EXISTING SYSTEM

The Hotel currently runs a manual booking system and therefore requires customers to only book
for rooms or any other service by walking to the receptionist or calling them on phone or using a
third party option. Any enquiry to be made demanding feedback must usually be forwarded to
the hotel in person. Sometimes management is given false reports concerning the work flow of
the hotel and employees also give falsified pricing information to customers from time to time.

From an employee’s account, details of customers are hardly used in the workflow and that also,
records are not properly kept; books used to keep records are disposed of when they get filled up.
Everest Hotel hardly advertises and depends on word of mouth adverts by some loyal customers
in and around its vicinity.

Fig.2: Context Diagram of Old System

8
5. THE PROPOSED SYSTEM

The proposed system is a web based application that allows customers to make enquiries online
and book for services providing the required details.

The following are solutions the proposed system brings on board:

•Well laid out information about Everest Hotel.


•The manual booking system is replaced with an electronic reservation system.
•Management can pull reports at anytime to tell the current situation in order to put the necessary
measures in place.
•The system helps secure customer information since no information is disposed off.

A customer surfs through any of the items of the proposed system. A contact us page is provided
where customers can send emails. More importantly, customers can make reservations at their
own pace.

Enquiry details

Reservation details Online


Customr Reservation
Confirmation details System

Fig. 3: Context Diagram of Proposed System

9
6. REQUIREMENTS

6.1 SYTEM REQUIREMENTS SPECIFICATION


A software requirements specification (SRS) is a comprehensive description of the intended
purpose and environment for software under development. The SRS fully describes what the
software will do and how it will be expected to perform.

6.1.1 FUNCTIONAL REQUIREMENTS

 Accept Date and Time to check available rooms for that particular time
 Display a list of available rooms
 Booking
 Cancel Booking
 Display record of boarders
 Calculate and display accommodation charges and other utilities

6.1.2 SOFTWARE REQUIREMENTS

Name of component Specification

Operating system Windows 98 or higher

Database MySQL server

Browser Chrome, Opera, e.t.c.

Table.1: Software Requirements

10
6.1.3 HARDWARE REQUIREMENTS

Name of component Specification

Keyboard(Input) 122 keys

Monitor(Output) 14” color monitor

Table.2: Hardware Requirements

6.1.4 SECURITY REQUIREMENTS

Unauthorized users are not allowed to access the system. So, to provide security password
protection was used and username was provider to the user. Also, passwords are saved in the
database. New user creation facility is provided to admin only.

11
7. DESIGN AND DEVELOPMENT OF THE PROPOSED SYSTEM

7.1 DATA STRUCUTRE DESIGN

The description of the data type that will be used in the new system are as below:

• Character varying(n), varchar(n): variables-length with limit

• Integer: 4 bytes

• Bytes: 4 bytes plus the actual binary string

• Data: 4 bytes

• Boolean: 1 byte

• Double Precision: 8 bytes

12
7.2 DATA FLOW DIAGRAM

A Data Flow Diagram (DFD) is a graphical representation of the “flow” of data through a
system.

A picture is worth a thousand words. A Data Flow Diagram (DFD) is traditional visual
representation of the information flows within a system. A neat and clear DFD can depict a
good amount of the system requirements graphically. It can be manual, automated, or
combination of both.

It shows how information enters and leaves the system, what changes the information and
where information is stored. The purpose of a DFD is to show the scope and boundaries of a
system as a whole. It may be used as a communications tool between a systems analyst and any
person who plays a part in the system that acts as the starting point for redesigning a system.

Customer

Booking request Booking Confirmation

Hotel
Reservation
System

Manage Room
customer and availability and
room records description

Administrator

Fig.4: DFD for Hotel Reservation System

13
7.3 ENTITY RELATIONSHIP DIAGRAM (ERD)

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.

Data Objects: A data object is a representation of almost any composite information that must
be understood by the software. By composite information, we mean something that has a number
of different properties or attributes. A data object encapsulates data only there is no reference
within a data object to operations that act on the data.

Attributes: Attributes define the properties of a data object and take on one of three different
characteristics. They can be used to:

Name an instance of data object.

Describe the instance.

Make reference to another instance in other table.

Relationships: Data objects are connected to one another in a variety of different ways. We can
define a set of object relationship pairs that define the relevant relationships.

14
Fig.5: E-R Diagram for Hotel Reservation System

15
7.4 USE CASE DIAGRAM

Use case is a list of steps, typically defining interaction between a role and a system, to achieve a
goal.

A use case diagram is a graphic depiction of the interactions among the elements of a system.
It is a methodology used in system analysis to identify, clarify, and organize system
requirements. In this context, the term "system" refers to something being developed or operated.
Use case diagrams are employed in UML (Unified Modeling Language), a standard notation for
the modeling of real-world objects and systems.

Fig.6: Use Case Diagram for Hotel Reservation System

16
8. TESTING

Testing is to check, verify and evaluate the product that comes up after going through the
demanding processes.

Usually, following testing types are used to check the integrity of the system:

8.1 UNIT TESTING


A unit is the smallest testable part of an application. The primary goal of unit testing is to take
the smallest piece of testable software in the application and isolate it from the remainder of the
code, and determine whether it behaves exactly as expected.

S.N Condition Expected Actual Result Remarks


Tested Result

1 Invalid Error message As per expected Pass


user/password is is generated. result.
entered.

2 Invalid Error message As per expected Pass


password is is generated. result.
entered.

Table.3: Unit Testing for Login

17
8.2 INTEGRATION TESTING
It is a logical extension of unit testing. Different units that have already been tested are combined
into a component and the interface between them is tested. Integration testing identifies problems
that occur when units are combined. Thus, integration testing is the phase where individual
software modules are combined and tested as a group.

S.N. Condition Tested Expected Result Actual result Remarks

1 It should It proceeds on As per Pass


navigate to next correct entry. Expected
page if correct Result.
user id and
password are
entered.

Table.4: Integration Testing for Login

18
8.3 SYSTEM TESTING
The system test focuses on the behavior of the system as a whole. User scenarios will be
executed against the system as well as error messages and navigations will be tested.

S.N. Condition Tested Expected Result Actual Result Remarks

1 The room If login and As per expected Pass


booking details registering is result.
and billing valid, then room
details are able to and billing
be viewed. details can be
viewed.

2 Data is Data should As per expected Pass


transferred transfer from one result.
properly between page to another
the pages. without any
hindrance.

Table.5: System Testing for booking and bill details

19
9. CONCLUSION

Hotel Reservation System provides a medium for both customer and staff of Everest Hotel to
perform specific tasks for booking a room according to the needs and requirements of the
customer. It solves the complexity of manual process of reservation and delivers a system which
can be both used for online booking by a customer and keeping track of large customer bases by
the employee of Everest Hotel.

The future extensions of the project are:-

1. System can be modified according to the future needs and requirements of Everest Hotel.

2. Future addition of different ranges of room will be considered.

20
10. BIBLIOGRAPHY

 S.Pressman “Software Engineering Fundamentals”, Seventh Edition


 https://www.scribd.com/ , Scribd,2018
 https://www.slideshare.net/masterabhi/online-hotel-room-booking-33265026
, SlideShare, 2018
 http://www.careeranna.com/articles/report-writing-format-sample-report/ ,
Career Anna, 2017

21
APPENDIX A

SYSTEM SNAPSHOTS
 MAIN PAGE

 LOGIN

22
 ROOM DETAILS

23
 PRICE DETAILS

 DATA ENTRY

24
 RECORD DISPLAY

25
 HOTEL PREMISES

26
APPENDIX B
CODE LISTING

1. login.php

<html>

<head>

<title>Login Page</title>

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

<link href="css/main.css" rel="stylesheet">

<?php

include "index6.php";

?>

<script language="javascript" type="text/javascript">

function fun_val()

var l=document.loginsell.username.value;

if(l=="")

alert("Please Enter User name");

document.loginsell.username.focus;

return false;

var p=document.loginsell.password.value;

27
if(p=="")

alert("Please Enter Password");

document.loginsell.password.focus;

return false;

</script>

<body>

<p align="center" id="loginpage"><br><TR></tr>

<form name="loginform" action="loginsession.php" method="post"><TR></tr>

<table font-family = "Georgia" class = "table" width="400" height="178"


align="center" cellpadding="1"cellspacing="1" border="3">

<tr>

<td height="41" colspan="2" align="center"><h2><b>Login Form</b></h2></td>

</tr>

<tr>

<td width="170" height="40" align="center"><b>User Name</b></td>

<td width="213">

<input type="text" name="username" style="background" />

</font></td>

</tr>

<tr>
28
<td height="38" align="center"><b>Password</b></td>

<td>

<input type="password" name="password" maxlength="8">

</font></td>

</tr>

<br />

<tr>

<td height="48" colspan="2" align="center">

<input type="submit" value="Submit" name="ok" onClick="return fun_val();"/>

<a href="userinfo.php">

<br/><br />New User?</a></font></td>

</tr>

</table>

<p>&nbsp;</p>

</form>

</body>

</html>

29
2. connection.php

<?php

$server="localhost";

$unm="root";

$pwd="";

$db="hotel";

$con=mysqli_connect($server,$unm,$pwd,$db);

?>

3. index.php

<html>

<head>

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

<link href="css/main.css" rel="stylesheet">

<title>index page</title>

</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top">

<div class="container-fluid">

<div class="navbar-header">

<a class="navbar-brand" href="index.php">EVEREST</a>

</div>

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

30
<ul class="nav navbar-nav">

<li><a href=home.php>Home</a></li>

<li><a href=accommodation.php>Accomodation</a></li>

<li><a href=tariff.php>Tariff and Policies</a></li>

<li><a href=aboutus.php>About Us</a></li>

</ul>

<ul class="nav navbar-nav navbar-right">

<li><a href="login.php">Login</a></li>

</ul>

</div>

</div>

</nav>

<div class="container-fluid" >

<img src="image/hotelext.jpg" width=100% height=100%>

</div>

<br />

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

</body>

</html>

31
4. accomodation.php

<html>

<head>

<title>Accomodation</title>

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

<link href="css/main.css" rel="stylesheet">

</head>

<body>

<?php

include "index4.php";

?>

<div id = "heading">

<h1>Accommodation</h1>

</div>

<div class="container-fluid">

<div class="row" >

<img src="image/suite.jpg" id='imgleft'>

<div id=heading>

<h2><i>Suite</i></h2>

</div>

32
<p>Everest Hotel provides suite rooms with more than one king
sized bed, an attached living room and study table. Customers can also enjoy a
breathtaking view in our suites designed with large glass windows. These rooms are
usually catered to business class customers so it is convenient if the customer wishes to
hold meetings. However, the purpose of suite rooms may vary depending on the
customers. </p>

</div>

<div class="row">

<img src="image/sdelux.jpg" id="imgright">

<div id=heading>

<h2><i>Super Deluxe</i></h2>

</div>

<p>Super deluxe rooms in Everest hotel are more or less similar to


deluxe rooms but super deluxe rooms are spacious with larger beds. The distinct feature
of these rooms are the beautiful views it offers. Along with a well-equipped bathroom,
TV, wifi, personal safe, writing desk, DVD players and so on </p>

<div class="hr"></div>

</div>

<div class="row">

<img src="image/deluxe.jpg" id="imgleft">

<div id=heading>

<h2><i>Deluxe</i></h2>

</div>

<p>Everest hotel offers luxurious deluxe rooms a single or double


beds. It has all the basic facilities provided by a standard room. However, deluxe rooms
are noticably more spacious and decorated. A writing desk and personal safe are also
added for the customers. </p>

<div class="hr"></div>

</div>
33
<div class="row">

<img src="image/standard.jpg" id="imgright">

<div id=heading>

<h2><i>Standard</i></h2>

</div>

<p>Standard rooms in Everest hotel are tailored for single


occupancy. It is the most basic room type the hotel offers but it is fully equipped for a
comfortable stay. The room consists of a single bed, air conditioner, TV, an attached
bathroom and a telephone. The hotel may also provide double beds on special request.
</p>

<div class="hr"></div>

</div>

</div>

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

</body>

</html>

34
5. bill.php

<?php

session_start();

?>

<html>

<head>

<title>Bill Page</title>

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

<link href="css/main.css" rel="stylesheet">

<body>

<?php

include "connection.php";

$type=$_SESSION['type'];

$qq=mysqli_query($con,"select `inrsin` from tariff where `type`='$type'");

while($res = mysqli_fetch_assoc($qq)){

$_SESSION['price'] = $res['inrsin'];

?>

<div id = "heading">

<h1>Bill</h1>

35
</div>

<div id = "heading">

<h2>Type of Rooms : <?php echo $_SESSION['type']; ?> </h2>

<h2>Cost per Room : <?php echo $_SESSION['price']; ?> </h2>

<h2>Number of Rooms : <?php echo $_SESSION['norm']; ?> </h2>

<h2>Number of Days : <?php echo $_SESSION['datediff']; ?> </h2>

<br><br>

<h2>Thank you for coming, <strong><?php echo


$_SESSION['username']?></strong></h2>

<h2>Following rooms have been booked.Have a nice day :)</h2>

<?php

include "connection.php";

$rid=$_SESSION['rid'];

$qq=mysqli_query($con,"select `room_number` from maprr where `r_id`= '$rid' ");

while($res = mysqli_fetch_assoc($qq)){

echo "<h2>R-";

echo $res['room_number'];
36
echo "</h2>";

?>

<h1>Your bill amount is <?php echo $_SESSION['price']?> x <?php echo


$_SESSION['norm'] ?> x <?php echo $_SESSION['datediff'] ?> = <?php echo
$_SESSION['price']*$_SESSION['norm']*$_SESSION['datediff'] ?></h1>

<div>

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

</body>

</html>

37
6. tariff.php

<html>

<head>

<title>Accomodation</title>

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

<link href="css/main.css" rel="stylesheet">

</head>

<body>

<?php

include "index1.php";

?>

<div id = "heading">

<h1>Tariff And Policies</h1>

</div>

<?php

include "connection.php";

$qrysel="select * from tariff";

$rs=mysqli_query($con,$qrysel);

if(!$rs)

38
echo "<font color=purple size=4>In correct mysql select Query.</font>";

die($qrysel);

echo "<center>";

echo "<table class=table>";

echo "<caption><font color='rgba(0,0,0,0.7)' size=4><b><i>Room


Tariff</i></b></font></caption>";

echo "<tr><th>ROOM</th><th colspan=2>INR</th><th


colspan=2>USD</th><th>TOTAL</th></tr>";

echo
"<tr><th>TYPE</th><th>SINGLE</th><th>DOUBLE</th><th>SINGLE</th><th>DO
UBLE</th><th>ROOM</th></tr>";

while($v=mysqli_fetch_array($rs))

echo "<tr>";

echo "<td>".$v['type']."</td>";

echo "<td>".$v[1]."</td>";

echo "<td>".$v[2]."</td>";

echo "<td>".$v[3]."</td>";

echo "<td>".$v[4]."</td>";

echo "<td>".$v[5]."</td>";

echo "</tr>";

echo "</table>";

?>

39
<br><br>

<center><table>

<tr>

<td>

<ul type=square>

<li>Policies: </li>

<ul>

<li>Check in 12 hours.

<li>Check out 12 hours.

<li>Early arrival is subject to availability,For guaranted


early check in,reservation needs to be made starlings form previous night.

<li>Goverment taxes & levies extra as applicable

<li>Inr Rs.700 (usd*60) for extra person/bed.

</ul>

<br>

<li>Reservation Guarantee: </li>

<ul>

<li>All booking must be guaranteed at time of reservation


bye money order or travel agency.

</ul>

<br>

<li>Reservation Cancellation: </li>

<ul>

<li>Reservation must be cancelled 24 hours prior to the


<br>planned arrivaltime.

<li>One night room charge will be levied in case of non arrival.


40
</ul>

</ul>

</table>

<br />

</body>

</html>

7. userdetailinsert.php

<?php

$l=mysqli_connect("localhost","root","","hotel");

$userid=$_POST["username"];

$password=$_POST['password'];

$username=$_POST['txtname'];

$useremail=$_POST['txtemail'];

$usercompany=$_POST['txtcompany'];

$userphone=$_POST['txtnumber'];

$useraddress=$_POST['txtaddress'];

$qiu=mysqli_query ($l,"INSERT INTO `user`

(`Userid`,`password`,`User Name`,`User Email`,`User Company`,`User


Phone`,`User Address`)VALUES

('$userid',

'$password','$username','$useremail','$usercompany','$userphone','$useraddress');
41
");

if(!$qiu)

$message = "Sorry! Username already taken :()";

echo "<script type='text/javascript'>alert('$message');</script>";

echo "<script>window.location='userinfo.php';</script>";

header("location:login.php?flag=1");

?>

8. loginsession.php

<?php

// ob_start();

session_start();

$l=mysqli_connect("localhost","root","",'hotel');

$username=$_POST['username'];

$password=$_POST['password'];

$q="select * from `user` where `Userid`='".$username."' and


`Password`='".$password."'";

$res=mysqli_query($l, $q);

if(mysqli_num_rows($res)>0)
42
{

$_SESSION['username']=$username;

echo "<script>window.location='reservation.php';</script>";

else

$message="Incorrect username/password found!";

echo "<script type='text/javascript'>alert('$message');</script>";

echo "<script>window.location='login.php';</script>";

echo"<script>close()</script>";

?>

43

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy