You are on page 1of 100

NEWLIGHT LODGING MANAGEMENT

1. INTRODUCTION

1.1 PROJECT PROFILE

Project Title : Newlight Lodging Management System


Platform : Microsoft Windows 7
Back-end Used : Mysql 4.5.1
Front-end Used : PHP 7.0.9,Javascript
Web Server : Apache Server 2.4.23
Team Size : 2
Development Tools : Notepad++,Xampp
7.0.9
Project Objective : Newlight lodging management system consists of Admin and user
to perform basic operations of a lodging.
Project Duration : 3 months
Guided By : Ms. Achsah Susan Mathew, MCA
Submitted To : Lowry Memorial College, Bangalore

LOWRY MEMORIAL COLLEGE Page 1


NEWLIGHT LODGING MANAGEMENT

1.2 PROJECT INTRODUCTION

Newlight lodging is an online booking system that permits booking of lodge for
a customer. The online system allows customer to check availability of the rooms both delux
and non-delux (AC/NON-AC) with various prices. Customer can book the rooms and check
facilities available. This system will show booking status of various dates. Online booking of
the rooms make easier for a customer has he does not have to come and see if availability of
rooms are there or not.

In these system admin has full control on the system. He can see all the booking status and
availability of rooms and also update the price and service charges .admin can manage staffs
details on the admin panel.

LOWRY MEMORIAL COLLEGE Page 2


NEWLIGHT LODGING MANAGEMENT

2. ENVIRONMENT DESCRIPTION
2.1 HARDWARE AND SOFTWARE REQUIREMENTS

Client Side Tools

Processor PC with a Pentium III-class processor,600 Mhz processor.

RAM 192 MB
Hard Disk 45 MB of available space required on system drive of available or
more.
Operating System Windows 7,8,8.1,10,Windows Server 2003 Service Pack1 or later.
Database MySql 4.5.1
Browser Google Chrome,Opera

Server Side Tools


Processor PC with a Pentium III-class processor,600 Mhz processor.
RAM 512 MB
Hard Disk 80GB
Operating System Windows 7,8,8.1,10,Windows Server 2003 Service Pack1 or later.
Software Mysql,PHP,Apache Server
Browser Google Chrome,Opera

Development Side Tools

Processor PC with Intel Core


RAM 1 GB
Hard Disk 320 GB
Operating System Windows 7,8,8.1,10,Windows Server 2003 Service Pack1 or later.
Software XAMPP Server,Notepad++,Pencil
Browser Google Chrome,Opera

LOWRY MEMORIAL COLLEGE Page 3


NEWLIGHT LODGING MANAGEMENT

2.2 TECHNOLOGY USED

What is PHP?

 PHP is a recursive acronym for "PHP: Hypertext Preprocessor".


 PHP is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire ecommerce sites.
 PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
 PHP is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire ecommerce sites.
 It is integrated with a number of popular databases, including MySQL, PostgreSQL,
Oracle, Sybase, Informix, and Microsoft SQL Server.
 PHP is pleasingly zippy in its execution, especially when compiled as an Apache
module on the Unix side. The MySQL server, once started, executes even very complex
queries with huge result sets in record-setting time.
 PHP supports a large number of major protocols such as POP3, IMAP, and LDAP.
PHP4 added support for Java and distributed object arch It is integrated with a number
of popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix, and
Microsoft SQL Server.
 PHP is pleasingly zippy in its execution, especially when compiled as an Apache
module on the Unix side. The MySQL server, once started, executes even very complex
queries with huge result sets in record-setting time.

COMMON USES OF PHP

 PHP can handle forms, i.e. gather data from files, save data to a file, thru email you
can send data, return data to the user.
 You add, delete, modify elements within your database thru PHP.
 Access cookies variables and set cookies.
 Using PHP, you can restrict users to access some pages of your website.
 It can encrypt data.

What can PHP do?


Anything. PHP is mainly focused on server-side scripting, so you can do anything
any other CGI program can do, such as collect form data, generate dynamic page content, or
send and receive cookies. But PHP can do much more.

There are three main areas where PHP scripts are used.
LOWRY MEMORIAL COLLEGE Page 4
NEWLIGHT LODGING MANAGEMENT

Server-side scripting: This is the most traditional and main target field for PHP. You
need three things to make this work: the PHP parser (CGI or server module), a web server
and a web browser. You need to run the web server, with a connected PHP installation. You
can access the PHP program output with a web browser, viewing the PHP page through the
server. All these can run on your home machine if you are just experimenting with PHP
programming. See the installation instructions section for more information.

Command line scripting: You can make a PHP script to run it without any server or
browser. You only need the PHP parser to use it this way. This type of usage is ideal for
scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows).
These scripts can also be used for simple text processing tasks. See the section about
Command line usage of PHP for more information.

Writing desktop applications: PHP is probably not the very best language to create a
desktop application with a graphical user interface, but if you know PHP very well, and
would like to use some advanced PHP features in your client-side applications you can also
use PHP-GTK to write such programs. You also have the ability to write cross-platform
applications this way. PHP-GTK is an extension to PHP, not available in the main
distribution.

MYSQL

o Relational Database Management System (RDBMS): MySQL is a relational database


management system.
o Easy to use: MySQL is easy to use. You have to get only the basic knowledge of
SQL. You can build and interact with MySQL with only a few simple SQL
statements.
o It is secure: MySQL consist of a solid data security layer that protects sensitive data
from intruders. Passwords are encrypted in MySQL.
o Client/ Server Architecture: MySQL follows a client /server architecture. There is a
database server (MySQL) and arbitrarily many clients (application programs), which
communicate with the server; that is, they query data, save changes, etc.
o Free to download: MySQL is free to use and you can download it from MySQL
official website.
o It is scalable: MySQL can handle almost any amount of data, up to as much as 50
million rows or more. The default file size limit is about 4 GB. However, you can
increase this number to a theoretical limit of 8 TB of data.
o Compatibale on many operating systems: MySQL is compatible to run on many
operating systems, like Novell NetWare, Windows* Linux*, many varieties of

LOWRY MEMORIAL COLLEGE Page 5


NEWLIGHT LODGING MANAGEMENT

UNIX* (such as Sun* Solaris*, AIX, and DEC* UNIX), OS/2, FreeBSD*, and others.
MySQL also provides a facility that the clients can run on the same computer as the
server or on another computer (communication via a local network or the Internet).
o Allows roll-back: MySQL allows transactions to be rolled back, commit and crash
recovery.
o High Performance: MySQL is faster, more reliable and cheaper because of its unique
storage engine architecture.
o High Flexibility: MySQL supports a large number of embedded applications which
makes MySQL very flexible.

APACHE SERVER
Apache is developed and maintained by an open community of developers under
the auspices of the Apache Software foundation.

Features of Apache Server


 Apache supports a variety of features, many implemented as compiled modules which
extend the core functionality.These can range from server-side programming language
support to authentication schemes.
 Some common language interfaces support Perl,Python,Tcl and PHP.Popular
authentication modules include mod_access,mod_auth,mod_digest,and
mod_auth_digest,the successor to mod_digest.
 A sample of other features include SSL and TLS support(mod_ssl),a proxy
module(mod_proxy),a URL rewriter(also known as a rewrite engine, implemented
under mod_rewrite).
 Virtual hosting allows one Apache installation to serve many different actual systems.
 Apache features configurable error messages,DBMS-based authentication
databases,and content negotiation.It is also supported by several graphical user
interfaces(GUIs).

PERFORMANCE OF APACHE SERVER


 Although the main design goal of Apache is not to be the “fastest” web server.Apache
does have performance comparable to other “high-performance” web servers.
 Instead of implementing a single architecture,Apache provides a variety of
Multiproccessing Modules(MPM’s) which allow Apache to run in a process-
based,hybrid(process and thread) or event-hybrid mode,to better match the demands
of each particular
infrastructure.
 The Apache version considered by the Apache Foundation as providing high-
performance is the multi-threaded version which mixes the use of several processes
and several threads per process.

LOWRY MEMORIAL COLLEGE Page 6


NEWLIGHT LODGING MANAGEMENT

3.SYSTEM STUDY

3.1 INTRODUCTION OF EXISTING SYSTEM

In “Newlight Lodging Management System” all the work is done manually.


Customer has to come to lodge for knowing the availability of the roomsand enters details to
book the kind of room they required. Owners has to go through how many days the customer
is staying.

Customer Record:
All the information of Customer are maintained by paper work,which is very
difficult and time consuming to maintain and search.

Staff record:
All the information of staff is maintained on paper which is not secure.

Booking records:
The information about bookingare maintained on paper which is very difficult
and time consuming to maintain and search.

3.2 SCOPE OF SYSTEM

The “NEWLIGHT LODGING MANAGEMENT SYSTEM” is concerned with


two categories of modules
1) Admin Modules
2) User Modules ( customers)

Admin Module:
1) Booking details
2) Customer details
3) Employee details
4) Add employee
5) Add food menu
6) Add room details
7) View room details
8) View payments

LOWRY MEMORIAL COLLEGE Page 7


NEWLIGHT LODGING MANAGEMENT

User Module:
1) Customer registration
2) Booking
3) billing
4) About/Contacts

3.3 PROPOSED SYSTEM

In the Newlight Lodging Management System,the Availability Details,Details


regarding Booking issue,Customer Details and Employee Details are managed by the
system.This system provides details about booking, billing Details,payment Details and
Accomodations Details.

OBJECTIVES OF SYSTEM
Objectives mean the various usages of one’s system.By clarifying the system
objectives one can be much clearer about the processes he/she has to perform.The Objectives
of our proposed system are:
 Keep records about customers, booking ,rooms and Employee.
 Saves time and makes work easy for the admin.
 It can reduce paper work.
 The System can allow administrator to select the particular information and delete or
edit them from the database.
 Maintains the whole information about the Newlight Lodging.
 Users can view the Booking for reference and search for availability of the rooms.

LOWRY MEMORIAL COLLEGE Page 8


NEWLIGHT LODGING MANAGEMENT

4. SYSTEM PLANNING

4.1 REQUIREMENT SPECIFICATION

Before building an elegant application,best way to indentify basic needs and


functionality is to visit systems relevant to that specific area addressed by proposed
application.
For gathering basic needs and functionalities,we had meeting with organization personal to
understand requires functionalities also noted down some useful feature to be included.We
also referred to some articles related to application to understand various functionalities.
 Requirement gathering for project “Newlight Lodging Management System” initiated
by the study of a past few projects.
 Some of the very experienced people like Ms.Achsah from our college also helped in
the process of requirements gathering.The requirements were hereby analysed an thus
accomplished the part of requirements gathering and analysis.
 We also took guidance from our college faculties to clear about requirement analysis.
 We held several meetings with our project guide to decide the process model and
basic system architecture.
 The current system satisfies all users requirements.

4.2 FEASIBILITY STUDY

Feasibility is defined as the practical extent to which a project can be


performed successfully. To evaluate feasibility, a feasibility study is performed, which
determines whether the solution considered to accomplish the requirements is practical
and workable in the software. Information such as resource availability, cost estimation
for software development, benefits of the software to the organization after it is developed
and cost to be incurred on its maintenance are considered during the feasibility study. The
objective of the feasibility study is to establish the reasons for developing the software
that is acceptable to users, adaptable to change and conformable to established standards.

OPERATIONAL FEASIBILITY
Operational feasibility is dependent on human resources available for the
project and involves projecting whether the system will be used if it is developed and
implemented.

LOWRY MEMORIAL COLLEGE Page 9


NEWLIGHT LODGING MANAGEMENT

Operational feasibility is a measure of how well a proposed system solves the problems,
and takes advantage of the opportunities identified during scope definition and how it
satisfies the requirements identified in the requirements analysis phase of system
development.
Operational feasibility reviews the willingness of the organization to support the proposed
system. This is probably the most difficult of the feasibilities to gauge. In order to determine
this feasibility, it is important to understand the management commitment to the proposed
project. If the request was initiated by management, it is likely that there is management
support and the system will be accepted and used. However, it is also important that the
employee base will be accepting of the change.

TECHNICAL FEASIBILITY

A large part of determining resources has to do with assessing technical


feasibility. It considers the technical requirements of the proposed project. The technical
requirements are then compared to the technical capability of the organization. The
systems project is considered technically feasible if the internal technical capability is
sufficient to support the project requirements.

The analyst must find out whether current technical resources can be upgraded or added
to in a manner that fulfills the request under consideration. This is where the expertise of
system analysts is beneficial, since using their own experience and their contact with
vendors they will be able to answer the question of technical feasibility.

ECONOMIC FEASIBILITY

Economic analysis could also be referred to as cost/benefit analysis. It


is the most frequently used method for evaluating the effectiveness of a new system. In
economic analysis the procedure is to determine the benefits and savings that are
expected from a candidate system and compare them with costs. If benefits outweigh
costs, then the decision is made to design and implement the system. An entrepreneur
must accurately weigh the cost versus benefits before taking an action.

The concerned business must be able to see the value of the investment it is pondering
before committing to an entire system study. If short-term costs are not overshadowed by
long-term gains or produce no immediate reduction in operating costs, then the system is
not economically feasible, and the project should not proceed any further. If the expected

LOWRY MEMORIAL COLLEGE Page 10


NEWLIGHT LODGING MANAGEMENT

benefits equal or exceed costs, the system can be judged to be economically feasible.
Economic analysis is used for evaluating the effectiveness of the proposed system.

4.3 LIFE CYCLE MODEL

 Types of Life Cycle Model:

 Prototype Model
 Waterfall Model
 Iterative Enhancement Model
 Spiral Model
 Dynamic System Development Model

PROTOTYPE MODEL

The Prototyping Model is a systems development method (SDM) in which


a prototype (an early approximation of a final system or product) is built, tested, and then
reworked as necessary until an acceptable prototype is finally achieved from which the
complete system or product can now be developed. This model works best in scenarios where
not all of the project requirements are known in detail ahead of time. It is an iterative, trial-
and-error process that takes place between the developers and the users.

WATERFALL MODEL

Waterfall approach was first SDLC Model to be used widely in Software


Engineering to ensure success of the project. In "The Waterfall" approach, the whole process
of software development is divided into separate phases. In Waterfall model, typically, the
outcome of one phase acts as the input for the next phase sequentially.

The advantage of waterfall development is that it allows for departmentalization and


control. A schedule can be set with deadlines for each stage of development and a product
can proceed through the development process model phases one by one.

ITERATIVE ENHANCEMENT MODEL

Iterative process starts with a simple implementation of a subset of the software


requirements and iteratively enhances the evolving versions until the full system is

LOWRY MEMORIAL COLLEGE Page 11


NEWLIGHT LODGING MANAGEMENT

implemented. At each iteration, design modifications are made and new functional
capabilities are added. The basic idea behind this method is to develop a system through
repeated cycles (iterative) and in smaller portions at a time (incremental).

The advantage of this model is that there is a working model of the system at a very early
stage of development which makes it easier to find functional or design flaws. Finding
issues at an early stage of development enables to take corrective measures in a limited
budget.

We have followed “Waterfall Model” for software engineering .This method


suggests,sequential approach to software development that being at the system level and
progress through analysis,design,coding,testing and maintenance.This model is also called
“Linear Sequetial Model” as one have to follow the following stages sequentially.

LOWRY MEMORIAL COLLEGE Page 12


NEWLIGHT LODGING MANAGEMENT

5. SYSTEM MODEL ARCHITECTURE

5.1 SYSTEM ARCHITECTURE

NEWLIGHT LODGING MANAGEMENT SYSTEM

CUSTOMER BOOKING ADD EMPLOYEE BILLING ROOMS PAYMENTS REPORTS


REGISTRATION

ADD ADD ADD VIEW ADD VIEW CUSTOMER


DELETE DELETE DELETE COMPUTE VIEW SEARCH EMPLOYEE
UPDATE UPDATE UPDATE SEARCH DELETE COMPUTE ROOMS
VIEW VIEW VIEW UPDATE BILLING

DATABASE

LOWRY MEMORIAL COLLEGE Page 13


NEWLIGHT LODGING MANAGEMENT

5.2 DATA FLOW DIAGRAM

The data flow diagram (DFD) is one of the most important tools used by system
analysts. Data flow diagrams are made up of a number symbols, which represent system
components. Most data flow modelling methods use four kinds of symbols. These symbols are
used to represent four kinds of system components. Processes, data stores, data flows and
external entities. Circles in DFD resent processes. Data Flow represented by a thin line in the
DFD and each data store has a unique name and square or rectangle represents external entities.
Unlike detailed flowchart, Data Flow Diagrams do not supply detailed description of the
modules but graphically describes a system’s data and how the data interact with the system.
To construct a Data Flow Diagram, we use,

 Arrow
 Circles
 Open End Box
 Squares
An arrow identifies the data flow in motion. It is a pipeline through which information is flown
like the rectangle in the flowchart. A circle stands for process that converts data into
Information. An open-ended box represents a data store, data at rest or a temporary repository
of data. A square defines a source or destination of system data

Data Flow Diagrams (DFD) or a Bubble chart is a graphical tool for structured analysis. It was
De Marco (1978) and Gane and Sarson (1979) who introduced the DFD. DFD models a system
by using external entities from which data flow’s to a process, which transform the data and
creates, output – data – flows which go to other processes or external entities or files. Data in
files many also flow to processes as inputs.

Flow diagrams are used to produce a pictorial representation of the flow of data in the
application. It is very easy to understand, and gives a basic idea about the working of the
application software and has the purpose of clarifying system requirements and identifying
major

Transformations that will become programs in system design. So it is the starting point of the
design phase that functionally decomposes the requirements specifications down to the lowest
level of detail.

LOWRY MEMORIAL COLLEGE Page 14


NEWLIGHT LODGING MANAGEMENT

There are various symbols used in a DFD. Bubbles represent the processes. Named arrows
indicate the data flow. External entities are represented by rectangles and are outside the
system such as vendors or customers with whom the system interacts. They either supply or
consume data. Entities supplying data are know as sources and those that consume data are
called sinks. Data is stored in a data store by a process in the system. Each component in a
DFD is labelled with a descriptive name. Process names are further identified with a number.
Context level DFD is drawn first. Then the processes are decomposed into several elementary
levels and are represented in the order of importance.

BASIC DFD SYMBOLS:

There are various symbols used in a DFD are namely:

1 “Arrow”

A data flow is a route, which enables packets of data to travel from one point to another. An
arrow identities data flow – data in motion. It is a pipeline through which information flows.

2“Process”

A process represents transformations where incoming data flows are changed into outgoing
data flows. A circle or a “bubble” represents a process that transforms incoming data flows
into outgoing data flow.

LOWRY MEMORIAL COLLEGE Page 15


NEWLIGHT LODGING MANAGEMENT

3“Data store”

A data store represents a repository of data that is to be stored for use by one or more
processes and may be simple as a buffer or queue or sophisticated as a relational database.
They should have clear names.
4“Source or Sink”

A source or sink is a person or part of an organization, which enters or receives information


from the system but is considered to be outside the context of data flow model. A DFD
describes what data flows (logical) rather than how they are processed, so it does not depend on
hardware, software, data structure or file organization.

The DFD methodology is quite effective, especially when the required design is unclear and the
user and the analyst need a notational language for communication. The DFD is easy to
understand after a brief orientation.

Several rules of thumb are used in drawing DFD’s

 Process should be named and numbered for easy reference.


 The direction of flow is from top to bottom and from left to right.
 When a process is exploded into lower-level details, they are numbered.
 The names of data stores, sources, and destinations are written in capital letters.

LOWRY MEMORIAL COLLEGE Page 16


NEWLIGHT LODGING MANAGEMENT

LEVEL 0 DFD

NEWLIGHT

NEWLIGHT LODGING
ADMIN MANAGEMENT SYSTEM

NEWLIGHT

NEWLIGHT LODGING
USER MANAGEMENT SYSTEM

LOWRY MEMORIAL COLLEGE Page 17


NEWLIGHT LODGING MANAGEMENT

LEVEL 1 DFD

ADMIN

LOGIN

Is Valid?

VIEW VIEW ADD VIEW VIEW


CUSTOMER BOOKING EMPLOYEE EMPLOYEE PAYMENT
E

ADD VIEW VIEW INSERT


ROOMS ROOMS FOOD FOOD

NEWLIGHT

GENERATE REPORT

REPORT

LOWRY MEMORIAL COLLEGE Page 18


NEWLIGHT LODGING MANAGEMENT

LEVEL 2 DFD

CUSTOMER

ROOMS BOOKING BILLING ROOM


AVAILABILITY SERVICES

NEWLIGHT

LOWRY MEMORIAL COLLEGE Page 19


NEWLIGHT LODGING MANAGEMENT

5.3 ER-DIAGRAM

PASSWORD STATE
ADDRESS
CUST_NAME
EMAIL

CUST_ID CUSTOMER
PHONE
COUNTRY E

CUST_NAME
BOOKING ID
ROOM TYPE
CHECK IN CATEGORY
NOOFCOTS
CONTACT
BOOKING ROOMS
ROOM TYPE
BOOKING TYPE ROOM NO
ADULTS
ROOM ROOM
CHILDREN CHARGES
ROOM_TYPE SERVICES
ROOM NO CHARGES
CHECK OUT
NO_OF_DAYS

BILLING

EMP_ID EMP_NAME

PRO_ID PRO_TITLE
DOB
EMPLOYEE
PRODUCTS
AGE

ADDRESS PR0_PRICE PRO_IMAGES


PHONE NO
E-MAIL

LOWRY MEMORIAL COLLEGE Page 20


NEWLIGHT LODGING MANAGEMENT

5.4 TABLES

ADMIN:

BOOKING:

CUSTOMER:

EMPLOYEE:

LOWRY MEMORIAL COLLEGE Page 21


NEWLIGHT LODGING MANAGEMENT

PRODUCTS:

ROOMS:

LOWRY MEMORIAL COLLEGE Page 22


NEWLIGHT LODGING MANAGEMENT

6. SOFTWARE TESTING
 Testing is the process of evaluating a system or its component(s) with the intent
to find whether it satisfies the specified requirements or not.

 Testing is executing a system in order to identify any gaps, errors, or missing


requirements in contrary to the actual requirements.

TEST OBJECTIVE:

 Finding defects which may get created by the programmer while developing the
software.

 Gaining confidence in and providing information about the level of quality.


 To prevent defects.
 To make sure that the end result meets the business and user requirements.
 To ensure that it satisfies the BRS that is Business Requirement Specification and
SRS that is System Requirement Specifications.
 To gain the confidence of the customers by providing them a quality product.

Software testing helps in finalizing the software application or product against


business and user requirements. It is very important to have good test coverage in order to
test the software application completely and make it sure that it’s performing well and as per
the specifications.

Software testing makes sure that the testing is being done properly and hence the system is
ready for use. Good coverage means that the testing has been done to cover the various areas
like functionality of the application, compatibility of the application with the OS, hardware
and different types of browsers, performancetesting to test the performance of the application
and loadtesting to make sure that the system is reliable and should not crash or there should
not be any blocking issues. It also determines that the application can be deployed easily to
the machine and without any resistance. Hence the application is easy to install, learn and
use.

UNIT TESTING
Unit testing is a software development process in which the smallest testable
parts of an application, called units, are individually and independently scrutinized for proper
operation. Unit testing can be done manually but is often automated.

LOWRY MEMORIAL COLLEGE Page 23


NEWLIGHT LODGING MANAGEMENT

Unit testing involves only those characteristics that are vital to the performance of the unit
under test. This encourages developers to modify the sourcecode without immediate concerns
about how such changes might affect the functioning of other units or the program as a
whole. Once all of the units in a program have been found to be working in the most efficient
and error-free manner possible, larger components of the program can be evaluated by means
of integrationtesting.

SYSTEM TESTING
System Testing (ST) is a black box testing technique performed to evaluate the
complete system the system's compliance against specified requirements. In System testing,
the functionalities of the system are tested from an end-to-end perspective.

System Testing is usually carried out by a team that is independent of the development team
in order to measure the quality of the system unbiased. It includes both functional and Non-
Functional testing.

6.1 TESTING INTRODUCTION

USER ACCEPTANCE TESTING


User acceptance testing (UAT) is the last phase of the software testing process.
During UAT, actual software users test the software to make sure it can handle required tasks
in real-world scenarios, according to specifications.
UAT is one of the final and critical software project procedures that must occur before newly
developed software is rolled out to the market.
UAT is also known as beta testing, application testing or end user testing.

ACCEPTANCE TESTING

Acceptance Testing is a level of the software testing where a system is tested for
acceptability.
The purpose of this test is to evaluate the system’s compliance with the business requirements
and assess whether it is acceptable for delivery.
It is the formal testing with respect to user needs, requirements, and business processes
conducted to determine whether or not a system satisfies the acceptance criteria and to enable
the user, customers or other authorized entity to determine whether or not to accept the
system.

LOWRY MEMORIAL COLLEGE Page 24


NEWLIGHT LODGING MANAGEMENT

6.2 TEST CASE

LOGIN PROCESS:

FIELD VALUE VALID/INVALID RESULT


User Name Null Invalid Please Enter Username And
Password
Password Null Invalid Please Enter username and
Password
Username john@hotmail.com Valid Please Enter Valid username and
Password
Password Wycliff Invalid Please Enter Valid username and
Password
Username john@hotmail.com Valid Redirect Towards the system

Password John Valid Redirect Towards the system

ADD CUSTOMER:

FIELD VALUE VALID/INVALID RESULT


Customer Null Invalid Please Enter Customer Name
name
Customer 76586 Invalid Please Enter Valid ISBN
name
Customer John Valid Redirect Towards the system
name
E-Mail Null Invalid Please Enter Book Name
E-Mail john@hotmail.com Valid Redirect Towards System
Password John Valid Redirect Towards the system
Password Null Invalid Please Enter password
Phone No 7739720851 Valid Redirect Towards the system
Phone No 378683836862482 Invalid Enter correct Phone No

LOWRY MEMORIAL COLLEGE Page 25


NEWLIGHT LODGING MANAGEMENT

Address Bengaluru Valid Redirect Towards the system


State Null Invalid Please Enter State
Country India valid Please Enter Only Integers

BOOKING:

FIELD VALUE VALID/INVALID RESULT


Customer Null Invalid Please Enter Customer Name
name
Customer 76586 Invalid Please Enter Valid Customer Name
name
Customer John Valid Redirect Towards the system
name
Booking Null Invalid Please Enter Booking Type
Type
Booking Single Occupancy valid Redirect Towards System
Type
Room AC/NON AC Valid Redirect Towards the system
Type
Room Null Invalid Please Enter room type
Type
Contact 7739720851 valid Redirect Towards the system
Contact 378683836862482 Invalid Enter correct Phone No
Room no Null Invalid Please Enter Room No
Adults Null Invalid Please Enter only Integers
Children Null Invalid Please Enter Only Integers
Check In Null Invalid Please Enter Date
Check In 04/22/2017 Valid Redirect Towards the system
Check Out Null Invalid Please Enter Date
Check Out 04/23/2017 Valid Redirect Towards the system

LOWRY MEMORIAL COLLEGE Page 26


NEWLIGHT LODGING MANAGEMENT

ADD EMPLOYEE:

FIELD VALUE VALID/INVALID RESULT


Employee Null Invalid Please Enter Employee
name
Employee 76586 Invalid Please Enter Valid Employee
Name
Employee John Valid Redirect Towards the system
Name
Date of Null Invalid Please Enter Date Of Birth
Birth
Date of 03/20/1996 valid Redirect Towards System
Birth
Age 21 Valid Redirect Towards the system
Age Null Invalid Please Enter Age
Phone No 7739720851 valid Redirect Towards the system
Phone No 378683836862482 Invalid Enter correct Phone No
Address Bengaluru Valid Redirect Towards the system
E-Mail Null Invalid Please Enter Book Name
E-Mail john@hotmail.com valid Redirect Towards System

LOWRY MEMORIAL COLLEGE Page 27


NEWLIGHT LODGING MANAGEMENT

7. CODING

Index:
<head>
<title>home</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>

<body>
<div id="menu">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="#">Accomodations</a>

<ul>
<li><a href="rooms.php">Rooms</a></li>

<li><a href="all_products.php">Room Service</a></li>


</ul>
</li>
<li><a href="#">Booking</a>
<ul>
<li><a href="availability.php">Availability</a></li>
<li><a href="customer.php">Customer Registration</a></li>
<li><a href="login.php">Login</a></li>
<li><a href="#">Book Now</a></li>
</ul>
</li>
<li><a href="galleries.php">Gallery</a></li>

LOWRY MEMORIAL COLLEGE Page 28


NEWLIGHT LODGING MANAGEMENT

<li><a href="billing.php">Billing</a></li>
<li><a href="#">Contact us</a></li>
<li><a href="admin_area/login.php">Admin</a></li>

</ul>
</div>

</body>
</html>
Login
<?php
session_start();

?>
<!DOCTYPE>
<html>
<head>
<title>Login Form</title>
<link rel="stylesheet" href="styles/login_style.css" media="all" />

</head>
<body>

<div class="login">
<h2 style="color:white; text-align:center;"><?php echo @$_GET['not_admin']; ?></h2>

<h2 style="color:white; text-align:center;"><?php echo @$_GET['logged_out']; ?></h2>

<h1>User Login</h1>

LOWRY MEMORIAL COLLEGE Page 29


NEWLIGHT LODGING MANAGEMENT

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


<input type="text" name="email" placeholder="Email" required="required" />
<input type="password" name="password" placeholder="Password" required="required" />
<button type="submit" class="btn btn-primary btn-block btn-large"
name="login">Login</button>
</form>
</div>
</body>
</html>
<?php

include("includes/db.php");

if(isset($_POST['login'])){

$email = mysql_real_escape_string($_POST['email']);
$password = mysql_real_escape_string($_POST['password']);

$sel_user = "select * from customer where email='$email' AND


password='$password'";

$run_user = mysqli_query($con, $sel_user);

$check_user = mysqli_num_rows($run_user);

if($check_user==1){

$_SESSION['user_email']=$email;

echo "<script>window.open('book.php?logged_in=You have successfully Logged


in!','_self')</script>";

LOWRY MEMORIAL COLLEGE Page 30


NEWLIGHT LODGING MANAGEMENT

}
else {

echo "<script>alert('Password or Email is wrong, try again!')</script>";

}
}

ROOMS:

<?php
include("index.php");
?>

<link type="text/css" rel="stylesheet" href="droom.css"/>

<div id="content">
<form action="rooms.php" method="post">

<h1 align="center"><?php echo @$_GET['deleted']; ?></h1>

<table width="800" border="5" align="center">


<tr>
<td align="center" colspan="9" bgcolor="light blue"><h1> Rooms
Details</h1></td>
</tr>
<tr>
<th>Serial No:</th>
<th>Room No:</th>
<th>Category:</th>
<th>Room Type:</th>

LOWRY MEMORIAL COLLEGE Page 31


NEWLIGHT LODGING MANAGEMENT

<th>No of Cots:</th>
<th>Room Charges(per day)</th>
<th>Room Services (per day)</th>
</tr>

<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from rooms";

$run = mysql_query($query1);

while($row=mysql_fetch_array($run)){

$id = $row['id'];
$room_no = $row['room_no'];
$category = $row['category'];
$room_type = $row['room_type'];
$no_of_cots = $row['no_of_cots'];
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];
?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $category ?></td>
<td><?php echo $room_type ?></td>
<td><?php echo $no_of_cots ?></td>

LOWRY MEMORIAL COLLEGE Page 32


NEWLIGHT LODGING MANAGEMENT

<td><?php echo $room_charges ?></td>


<td><?php echo $room_services ?></td>
</tr>
<?php } ?>
</table>
</div>

ROOM SERVICES
<!DOCTYPE>
<?php

include("index.php");
include("includes/db.php")

?>
<html>
<head>
<title>New Light Restaurant</title>

<link rel="stylesheet" href="product.css" media="all" />


</head>

<body>

<div id="form">
<form method="get" action="results.php"
enctype="multipart/form-data">
<input type="text" name="user_query"
placeholder="Search a product"/ >
<input type="submit" name="search" value="Search"
/>

LOWRY MEMORIAL COLLEGE Page 33


NEWLIGHT LODGING MANAGEMENT

</form>

</div>

</div>
<!--Navigation Bar ends-->

<div id="products_box">

<?php
$get_pro = "select * from products";

$run_pro = mysqli_query($con, $get_pro);

while($row_pro=mysqli_fetch_array($run_pro)){

$product_id = $row_pro['pro_id'];
$product_title = $row_pro['pro_title'];
$product_price = $row_pro['pro_price'];
$product_image = $row_pro['pro_image'];

echo "
<div id='single_product'>

<h3>$product_title</h3>

<img src='admin_area/product_images/$product_image'
width='180' height='180' />
<p><b> $ $product_price </b></p>
</div>";

LOWRY MEMORIAL COLLEGE Page 34


NEWLIGHT LODGING MANAGEMENT

}
?>

</div>

</div>
</div>
<!--Content wrapper ends-->
</div>
<!--Main Container ends here-->
</body>
</html>

AVAILABILITY

<?php
include("index.php");
?>

<link type="text/css" rel="stylesheet" href="droom.css"/>

<div id="content">
<form action="availability.php" method="post">

<h1 align="center"><?php echo @$_GET['deleted']; ?></h1>

<table width="800" border="5" align="center">


<tr>
<td align="center" colspan="9" bgcolor="light blue"><h1>Available Rooms
Details</h1></td>

LOWRY MEMORIAL COLLEGE Page 35


NEWLIGHT LODGING MANAGEMENT

</tr>
<tr>
<th>Serial No:</th>
<th>Room No:</th>
<th>Category:</th>
<th>Room Type:</th>
<th>No of Cots:</th>
<th>Room Charges(per day)</th>
<th>Room Services (per day)</th>
<th>Book Now</th>
</tr>

<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from rooms where not exists (select * from booking where
booking.room_no=rooms.room_no)";

$run = mysql_query($query1);

while($row=mysql_fetch_array($run)){

$id = $row['id'];
$room_no = $row['room_no'];
$category = $row['category'];
$room_type = $row['room_type'];
$no_of_cots = $row['no_of_cots'];
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];

LOWRY MEMORIAL COLLEGE Page 36


NEWLIGHT LODGING MANAGEMENT

?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $category ?></td>
<td><?php echo $room_type ?></td>
<td><?php echo $no_of_cots ?></td>
<td><?php echo $room_charges ?></td>
<td><?php echo $room_services ?></td>
<td><a href="login.php">Book Now</td>

</tr>
<?php } ?>
</table>
</div>

CUSTOMERS
<html>
<head>
<title>Customer Registration</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>

<?php
include("index.php");
?>

<div id="area">
<form action="customer.php" method="post">

LOWRY MEMORIAL COLLEGE Page 37


NEWLIGHT LODGING MANAGEMENT

<table width="600" border="10" align="center">


<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>Customer
Registration</h1></td>
</tr>

<tr>
<td align="right" bgcolor="white">Customer Name:</td>
<td><input type="text" name="name"></td>
</tr>

<tr>
<td align="right" bgcolor="white">E-mail:</td>
<td><input type="text" name="email"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Password:</td>
<td><input type="text" name="password"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Phone No.:</td>
<td><input type="text" name="phone_no"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Address:</td>
<td><input type="text" name="address"></td>
</tr>

LOWRY MEMORIAL COLLEGE Page 38


NEWLIGHT LODGING MANAGEMENT

<tr>
<td align="right" bgcolor="white">State:</td>
<td><input type="text" name="state"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Country:</td>
<td><input type="text" name="country"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit" name="submit"
value="Register Now"></td>
</tr>

</table>
</form>
</div>
</body>
</html>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");

if(isset($_POST['submit'])){

$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
$phone_no = $_POST['phone_no'];
$address = $_POST['address'];

LOWRY MEMORIAL COLLEGE Page 39


NEWLIGHT LODGING MANAGEMENT

$state = $_POST['state'];
$country = $_POST['country'];

//Insert the value in the booking table

$query ="insert into customer (cust_name,email,password,phone_no,address,state,country)


value ('$name','$email','$password','$phone_no','$address','$state','$country')";

if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}

}
?>

BOOKING
<html>
<head>
<title>Booking</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>
<?php
include("index.php");
?>

<div id="area">
<form action="book.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>BOOKING</h1></td>

LOWRY MEMORIAL COLLEGE Page 40


NEWLIGHT LODGING MANAGEMENT

</tr>

<tr>
<td align="right" bgcolor="white">Customer Name:</td>
<td><input type="text" name="name"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Contact:</td>
<td><input type="text" name="contact"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Booking type:</td>
<td><input type="text" name="booking_type"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room Type:</td>
<td><input type="text" name="room_type"></td>
</tr>

<tr>
<td align="right" bgcolor="white">No_Of_Days:</td>
<td><input type="number" name="no_of_days"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Check In:</td>
<td><input type="date" name="check_in"></td>

LOWRY MEMORIAL COLLEGE Page 41


NEWLIGHT LODGING MANAGEMENT

</tr>

<tr>
<td align="right" bgcolor="white">Check Out:</td>
<td><input type="date" name="check_out"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room No:</td>
<td><input type="number" name="room_no"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Adults:</td>
<td><input type="number" name="adults"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Children:</td>
<td><input type="number" name="children"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit" name="submit"
value="Submit Now"></td>
</tr>

</table>
</form>
</div>
</body>
</html>

LOWRY MEMORIAL COLLEGE Page 42


NEWLIGHT LODGING MANAGEMENT

<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");

if(isset($_POST['submit'])){

$name = $_POST['name'];
$contact = $_POST['contact'];
$booking_type = $_POST['booking_type'];
$room_type = $_POST['room_type'];
$no_of_days = $_POST['no_of_days'];
$check_in = $_POST['check_in'];
$check_out = $_POST['check_out'];
$room_no = $_POST['room_no'];
$adults = $_POST['adults'];
$children = $_POST['children'];

//Insert the value in the booking table

$query ="insert into booking


(cust_name,contact,booking_type,room_type,no_of_days,check_in,check_out,no_of_rooms,a
dults,children) value
('$name','$contact','$booking_type','$room_type','$no_of_days','$check_in','$check_out','$no_
of_rooms','$adults','$children')";

if(mysql_query($query)){
echo "<h1>ROOM BOOKED</h1>";
}
}
?>

LOWRY MEMORIAL COLLEGE Page 43


NEWLIGHT LODGING MANAGEMENT

GALLERY

<!--
###########################################################################
############################ -->
<?php
include("index.php");
?>
<div id="homecontent">
<div class="wrapper">
<br></br>
<div id="">

<img class="mySlides" src="images/1.jpg"


style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/2.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/3.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/4.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/5.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/6.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/7.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/8.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/9.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/10.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/11.jpg"
style="width:1400px;height:600px;border=5;align=center ">

LOWRY MEMORIAL COLLEGE Page 44


NEWLIGHT LODGING MANAGEMENT

<img class="mySlides" src="images/12.jpg"


style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/13.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/14.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/15.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/16.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/17.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/18.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/19.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/20.jpg"
style="width:1400px;height:600px;border=5;align=center ">
<img class="mySlides" src="images/21.jpg"
style="width:1400px;height:600px;border=5;align=center ">

<script type = "text/javascript">


var slideIndex = 0;
carousel();

function carousel() {
var i;
var x = document.getElementsByClassName("mySlides");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
slideIndex++;
if (slideIndex > x.length) {slideIndex = 1}
x[slideIndex-1].style.display = "block";

LOWRY MEMORIAL COLLEGE Page 45


NEWLIGHT LODGING MANAGEMENT

setTimeout(carousel, 1000); // Change image every 1 seconds


}
</script>
</div>
</div>
</div>

BILLING

<?php
include("index.php");
?>

<link type="text/css" rel="stylesheet" href="droom.css"/>

<div id="content">
<form action="availability.php" method="post">

<table width="800" border="5" align="center">


<tr>
<td align="center" colspan="9" bgcolor="light blue"><h1>Billing Details</h1></td>
</tr>
<tr>

<th>Customer Name:</th>
<th>Room Number:</th>
<th>No of Days</th>
<th>Check In</th>
<th>Check Out</th>
<th>Room Charges(per day)</th>

LOWRY MEMORIAL COLLEGE Page 46


NEWLIGHT LODGING MANAGEMENT

<th>Room Services (per day)</th>


<th>Total Amount</th>
</tr>
<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select
booking.cust_name,booking.room_no,booking.no_of_days,booking.check_in,booking.check
_out,rooms.room_charges,rooms.room_services from booking,rooms where
booking.room_no=rooms.room_no";
$query2= "select room_charges,room_services,(room_charges+room_services) as total from
room"

$run = mysql_query($query1);

while($row=mysql_fetch_array($run)){

$cust_name = $row['cust_name'];
$room_no = $row['room_no'];
$no_of_days = $row['no_of_days'];
$check_in = $row['check_in'];
$check_out = $row['check_out'];
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];

$run = mysql_query($query2);
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];

?>

LOWRY MEMORIAL COLLEGE Page 47


NEWLIGHT LODGING MANAGEMENT

<tr align="center">
<td><?php echo $cust_name ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $no_of_days ?></td>
<td><?php echo $check_in ?></td>
<td><?php echo $check_out ?></td>
<td><?php echo $room_charges ?></td>
<td><?php echo $room_services ?></td>
<td><?php echo $total?></td>
</tr>
<?php } ?>
</table>
</div>

ADMIN
LOGIN

<?php
session_start();

?>
<!DOCTYPE>
<html>
<head>
<title>Login Form</title>
<link rel="stylesheet" href="styles/login_style.css" media="all" />

</head>
<body>
<div class="login">

LOWRY MEMORIAL COLLEGE Page 48


NEWLIGHT LODGING MANAGEMENT

<h2 style="color:white; text-align:center;"><?php echo @$_GET['not_admin']; ?></h2>

<h2 style="color:white; text-align:center;"><?php echo @$_GET['logged_out']; ?></h2>

<h1>Admin Login</h1>
<form method="post" action="login.php">
<input type="text" name="email" placeholder="Email" required="required" />
<input type="password" name="password" placeholder="Password" required="required" />
<button type="submit" class="btn btn-primary btn-block btn-large"
name="login">Login</button>
</form>
</div>
</body>
</html>
<?php

include("includes/db.php");

if(isset($_POST['login'])){

$email = mysql_real_escape_string($_POST['email']);
$pass = mysql_real_escape_string($_POST['password']);

$sel_user = "select * from admins where user_email='$email' AND


user_pass='$pass'";

$run_user = mysqli_query($con, $sel_user);

$check_user = mysqli_num_rows($run_user);

if($check_user==1){

LOWRY MEMORIAL COLLEGE Page 49


NEWLIGHT LODGING MANAGEMENT

$_SESSION['user_email']=$email;

echo "<script>window.open('index.php?logged_in=You have successfully Logged


in!','_self')</script>";

}
else {

echo "<script>alert('Password or Email is wrong, try again!')</script>";

?>

LOGOUT

<?php
session_start();

session_destroy();

echo "<script>window.open('login.php?logged_out=You have logged out!please


login','_self')</script>";
?>

LOWRY MEMORIAL COLLEGE Page 50


NEWLIGHT LODGING MANAGEMENT

CUSTOMER DETAILS
<html>
<head>
<title>Customer Details</title>
<link type="text/css" rel="stylesheet" href="customer.css"/>
</head>
<body>

<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Booking Details</a>
<ul>
<li><a href="customerdetails.php">Customer Details</a></li>
<li><a href="booking.php">View Booking</a></li>
</ul>
</li>
<li><a href="#">Employee Details</a>
<ul>
<li><a href="addemployee.php">Add
Employee</a></li>
<li><a
href="viewemployee.php">Employee Details</a></li>
</ul>
</li>
<li><a href="#">View Payment</a></li>
<li><a href="logout.php">Admin Logout</a></li>
</ul>
</div>

<div id="content">

LOWRY MEMORIAL COLLEGE Page 51


NEWLIGHT LODGING MANAGEMENT

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

<h1 align="center"><?php echo @$_GET['deleted']; ?></h1>

<table width="800" border="5" align="center">


<tr>
<td align="center" colspan="9" bgcolor="light blue"><h1>Customers
Details</h1></td>
</tr>
<tr>
<th>Serial No:</th>
<th>Customer Name:</th>
<th>E-mail:</th>
<th>Phone No:</th>
<th>Address</th>
<th>State</th>
<th>Country</th>
<th>Delete</th>
<th>Edit</th>
</tr>

<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from customer";

$run = mysql_query($query1);

while($row=mysql_fetch_array($run)){

LOWRY MEMORIAL COLLEGE Page 52


NEWLIGHT LODGING MANAGEMENT

$id = $row['cust_id'];
$name = $row['cust_name'];
$email = $row['email'];
$phone_no = $row['phone_no'];
$address = $row['address'];
$state = $row['state'];
$country = $row['country'];

?>

<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $name ?></td>
<td><?php echo $email ?></td>
<td><?php echo $phone_no ?></td>
<td><?php echo $address ?></td>
<td><?php echo $state ?></td>
<td><?php echo $country ?></td>
<td><a href="delete3.php?del=<?php echo $id; ?>">Delete</td>
<td>Edit</td>

</tr>
<?php } ?>
</table>
</div>
</body>
</html>

LOWRY MEMORIAL COLLEGE Page 53


NEWLIGHT LODGING MANAGEMENT

VIEW BOOKING
<html>
<head>
<title>Booking Details</title>
<link type="text/css" rel="stylesheet" href="booking.css"/>
</head>
<body>

<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Booking Details</a>
<ul>
<li><a href="customerdetails.php">Customer Details</a></li>
<li><a href="booking.php">View Booking</a></li>
</ul>
</li>
<li><a href="#">Employee Details</a>
<ul>
<li><a href="addemployee.php">Add
Employee</a></li>
<li><a
href="viewemployee.php">Employee Details</a></li>
</ul>
</li>
<li><a href="#">View Payment</a></li>
<li><a href="logout.php">Admin Logout</a></li>
</ul>
</div>

<div id="content">

LOWRY MEMORIAL COLLEGE Page 54


NEWLIGHT LODGING MANAGEMENT

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

<h1 align="center"><?php echo @$_GET['deleted']; ?></h1>

<table width="800" border="5" align="center">

<tr>
<td align="center" colspan="12" bgcolor="light blue"><h1>Booking
Details</h1></td>
</tr>

<tr>
<th>Serial No:</th>
<th>Customer Name:</th>
<th>Contact:</th>
<th>Booking Type:</th>
<th>Room Type</th>
<th>Check In</th>
<th>Check Out</th>
<th>Room No</th>
<th>Adults</th>
<th>Children</th>
<th>Delete</th>
<th>Edit</th>
</tr>

<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table

LOWRY MEMORIAL COLLEGE Page 55


NEWLIGHT LODGING MANAGEMENT

$query1= "select * from booking";

$run = mysql_query($query1);

while($row=mysql_fetch_array($run)){

$id = $row['booking_id'];
$name = $row['cust_name'];
$contact = $row['contact'];
$booking_type = $row['booking_type'];
$room_type = $row['room_type'];
$check_in = $row['check_in'];
$check_out = $row['check_out'];
$room_no = $row['room_no'];
$adults = $row['adults'];
$children = $row['children'];

?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $name ?></td>
<td><?php echo $contact ?></td>
<td><?php echo $booking_type ?></td>
<td><?php echo $room_type ?></td>
<td><?php echo $check_in ?></td>
<td><?php echo $check_out ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $adults ?></td>
<td><?php echo $children ?></td>
<td><a href="delete2.php?del=<?php echo $id; ?>">Delete</td>

LOWRY MEMORIAL COLLEGE Page 56


NEWLIGHT LODGING MANAGEMENT

<td>Edit</td>

</tr>
<?php } ?>
</table>
</div>
</body>
</html>

ADD EMPLOYEE
<html>
<head>
<title>Add Employee</title>
<link type="text/css" rel="stylesheet" href="employee.css"/>
</head>
<body>

<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Booking Details</a>
<ul>
<li><a href="customerdetails.php">Customer Details</a></li>
<li><a href="booking.php">View Booking</a></li>
</ul>
</li>
<li><a href="#">Employee Details</a>
<ul>
<li><a href="addemployee.php">Add
Employee</a></li>

LOWRY MEMORIAL COLLEGE Page 57


NEWLIGHT LODGING MANAGEMENT

<li><a
href="viewemployee.php">Employee Details</a></li>
</ul>
</li>
<li><a href="#">View Payment</a></li>
<li><a href="logout.php">Admin Logout</a></li>
</ul>
</div>

<div id="area">
<form action="addemployee.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="orange"><h1>Add Employee</h1></td>
</tr>

<tr>
<td align="right" bgcolor="white">Employee Name:</td>
<td><input type="text" name="name"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Date_of_birth:</td>
<td><input type="text" name="dob"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Age:</td>
<td><input type="text" name="age"></td>
</tr>

LOWRY MEMORIAL COLLEGE Page 58


NEWLIGHT LODGING MANAGEMENT

<tr>
<td align="right" bgcolor="white">Phone No.:</td>
<td><input type="text" name="phone_no"></td>
</tr>

<tr>
<td align="right" bgcolor="white">E-mail:</td>
<td><input type="text" name="email"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Address:</td>
<td><input type="text" name="address"></td>
</tr>

<tr>
<td colspan="5" font="20px" align="center"><input type="submit" name="submit"
value="Add Now"></td>
</tr>

</table>

</form>
</div>
</body>
</html>

LOWRY MEMORIAL COLLEGE Page 59


NEWLIGHT LODGING MANAGEMENT

<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");

if(isset($_POST['submit'])){

$name = $_POST['name'];
$dob = $_POST['dob'];
$age = $_POST['age'];
$phone_no = $_POST['phone_no'];
$email = $_POST['email'];
$address = $_POST['address'];

//Insert the value in the booking table

$query ="insert into employee (emp_name,date_of_birth,age,phone_no,email,address)


value ('$name','$dob','$age','$phone_no','$email','$address')";

if(mysql_query($query)){
echo "<h1>Employee Added</h1>";
}

?>

LOWRY MEMORIAL COLLEGE Page 60


NEWLIGHT LODGING MANAGEMENT

EMPLOYEE DETAILS

<html>
<head>
<title>Booking Details</title>
<link type="text/css" rel="stylesheet" href="emp.css"/>
</head>
<body>

<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Booking Details</a>
<ul>
<li><a href="customerdetails.php">Customer Details</a></li>
<li><a href="booking.php">View Booking</a></li>
</ul>
</li>
<li><a href="#">Employee Details</a>
<ul>
<li><a href="addemployee.php">Add
Employee</a></li>
<li><a
href="viewemployee.php">Employee Details</a></li>
</ul>
</li>
<li><a href="#">View Payment</a></li>
<li><a href="logout.php">Admin Logout</a></li>
</ul>
</div>

LOWRY MEMORIAL COLLEGE Page 61


NEWLIGHT LODGING MANAGEMENT

<div id="content">
<form action="viewemployee.php" method="post">

<h1 align="center"><?php echo @$_GET['deleted']; ?></h1>

<table width="800" border="5" align="center">

<tr>
<td align="center" colspan="9" bgcolor="light blue"><h1>Employee
Details</h1></td>
</tr>

<tr>
<th>Serial No:</th>
<th>Employee Name</th>
<th>Date Of Birth</th>
<th>Age</th>
<th>Phone No</th>
<th>E-mail</th>
<th>Address</th>
<th>Delete</th>
<th>Edit</th>
</tr>

<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from employee";

LOWRY MEMORIAL COLLEGE Page 62


NEWLIGHT LODGING MANAGEMENT

$run = mysql_query($query1);

while($row=mysql_fetch_array($run)){

$id = $row['emp_id'];
$name = $row['emp_name'];
$date_of_birth = $row['date_of_birth'];
$age = $row['age'];
$phone_no = $row['phone_no'];
$email = $row['email'];
$address = $row['address'];
?>

<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $name ?></td>
<td><?php echo $date_of_birth ?></td>
<td><?php echo $age ?></td>
<td><?php echo $phone_no ?></td>
<td><?php echo $email ?></td>
<td><?php echo $address ?></td>
<td><a href="delete1.php?del=<?php echo $id; ?>">Delete</td>
<td>Edit</td>
</tr>
<?php } ?>
</table>
</div>
</body>
</html>

LOWRY MEMORIAL COLLEGE Page 63


NEWLIGHT LODGING MANAGEMENT

ROOMS
<?php
include("index.php");
?>
<link type="text/css" rel="stylesheet" href="delux.css"/>

<div id="area">
<form action="rooms.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1> Insert Delux Rooms
Details</h1></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room No.:</td>
<td><input type="text" name="room_no"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Category.:</td>
<td><input type="text" name="category"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room Type:</td>
<td><input type="text" name="room_type"></td>
</tr>

<tr>

LOWRY MEMORIAL COLLEGE Page 64


NEWLIGHT LODGING MANAGEMENT

<td align="right" bgcolor="white">No.Of Cots:</td>


<td><input type="text" name="no_of_cots"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room Charges(per day):</td>
<td><input type="text" name="room_charges"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room Service(per day):</td>
<td><input type="text" name="room_services"></td>
</tr>

<tr>
<td colspan="5" font="20px" align="center"><input type="submit" name="submit"
value="Add Now"></td>
</tr>

</table>

</form>
</div>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");

if(isset($_POST['submit'])){

LOWRY MEMORIAL COLLEGE Page 65


NEWLIGHT LODGING MANAGEMENT

$room_no = $_POST['room_no'];
$category = $_POST['category'];
$room_type = $_POST['room_type'];
$no_of_cots = $_POST['no_of_cots'];
$room_charges = $_POST['room_charges'];
$room_services= $_POST['room_services'];

//Insert the value in the booking table

$query ="insert into rooms


(room_no,category,room_type,no_of_cots,room_charges,room_services) value
('$room_no','$category','$room_type','$no_of_cots','$room_charges','$room_services')";

if(mysql_query($query)){
echo "<h1>Rooms Added</h1>";
}

}
?>

ROOMS DETAILS
<?php
include("index.php");
?>

<link type="text/css" rel="stylesheet" href="droom.css"/>

<div id="content">
<form action="deluxroom.php" method="post">

<h1 align="center"><?php echo @$_GET['deleted']; ?></h1>

LOWRY MEMORIAL COLLEGE Page 66


NEWLIGHT LODGING MANAGEMENT

<table width="800" border="5" align="center">


<tr>
<td align="center" colspan="9" bgcolor="light blue"><h1>Delux Rooms
Details</h1></td>
</tr>
<tr>
<th>Serial No:</th>
<th>Room No:</th>
<th>Category:</th>
<th>Room Type:</th>
<th>No of Cots:</th>
<th>Room Charges(per day)</th>
<th>Room Services (per day)</th>
<th>Delete</th>
<th>Edit</th>
</tr>

<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from rooms";

$run = mysql_query($query1);

while($row=mysql_fetch_array($run)){

$id = $row['id'];
$room_no = $row['room_no'];
$category = $row['category'];

LOWRY MEMORIAL COLLEGE Page 67


NEWLIGHT LODGING MANAGEMENT

$room_type = $row['room_type'];
$no_of_cots = $row['no_of_cots'];
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];

?>

<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $category ?></td>
<td><?php echo $room_type ?></td>
<td><?php echo $no_of_cots ?></td>
<td><?php echo $room_charges ?></td>
<td><?php echo $room_services ?></td>
<td><a href="delete3.php?del=<?php echo $id; ?>">Delete</td>
<td>Edit</td>

</tr>
<?php } ?>
</table>
</div>

INSERT FOOD

<!DOCTYPE>
<?php
include("index.php");
?>
<?php

LOWRY MEMORIAL COLLEGE Page 68


NEWLIGHT LODGING MANAGEMENT

include("includes/db.php");

?>
<html>
<head>
<title>Inserting Product</title>

<script src="//tinymce.cachefly.net/4.1/tinymce.min.js"></script>
<script>
tinymce.init({selector:'textarea'});
</script>
</head>
<link type="text/css" rel="stylesheet" href="insert_product.css"/>
<div id="content">
<body bgcolor="skyblue">

<form action="insert_product.php" method="post" enctype="multipart/form-data">

<table align="center" width="795" border="2" bgcolor="#187eae">

<tr align="center">
<td colspan="7"><h2>Insert Food Items Here</h2></td>
</tr>

<tr>
<td align="right"><b>Food Title:</b></td>
<td><input type="text" name="product_title" size="60"
required/></td>
</tr>

LOWRY MEMORIAL COLLEGE Page 69


NEWLIGHT LODGING MANAGEMENT

<tr>
<td align="right"><b>Food Image:</b></td>
<td><input type="file" name="product_image" /></td>
</tr>

<tr>
<td align="right"><b>Food Price:</b></td>
<td><input type="text" name="product_price" required/></td>
</tr>

<tr align="center">
<td colspan="7"><input type="submit" name="insert_post"
value="Insert Food Now"/></td>
</tr>

</table>

</form>

</div>
</body>
</html>
<?php

if(isset($_POST['insert_post'])){

//getting the text data from the fields


$product_title = $_POST['product_title'];

LOWRY MEMORIAL COLLEGE Page 70


NEWLIGHT LODGING MANAGEMENT

$product_price = $_POST['product_price'];

//getting the image from the field


$product_image = $_FILES['product_image']['name'];
$product_image_tmp = $_FILES['product_image']['tmp_name'];

move_uploaded_file($product_image_tmp,"product_images/$product_image");

$insert_product = "insert into products (pro_title,pro_price,pro_image) values


('$product_title','$product_price','$product_image')";

$insert_product = mysqli_query($con, $insert_product);

if($insert_pro){

echo "<script>alert('Product Has been inserted!')</script>";


echo
"<script>window.open('insert_product.php?insert_product','_self')</script>";

}
}
?>

VIEW FOOD
<?php
include("index.php");
?>
<link type="text/css" rel="stylesheet" href="view_products.css"/>
<div id="content">
<form action="view_products.php" method="post">

LOWRY MEMORIAL COLLEGE Page 71


NEWLIGHT LODGING MANAGEMENT

<table width="795" align="center" bgcolor="pink">

<tr align="center">
<td colspan="6"><h2>View All Food Items Here</h2></td>
</tr>

<tr align="center" bgcolor="skyblue">


<th>S.N</th>
<th>Title</th>
<th>Image</th>
<th>Price</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<?php
include("includes/db.php");

$get_pro = "select * from products";

$run_pro = mysqli_query($con, $get_pro);

$i = 0;

while ($row_pro=mysqli_fetch_array($run_pro)){

$pro_id = $row_pro['pro_id'];
$pro_title = $row_pro['pro_title'];
$pro_image = $row_pro['pro_image'];
$pro_price = $row_pro['pro_price'];

LOWRY MEMORIAL COLLEGE Page 72


NEWLIGHT LODGING MANAGEMENT

$i++;

?>
<tr align="center">
<td><?php echo $i;?></td>
<td><?php echo $pro_title;?></td>
<td><img src="product_images/<?php echo $pro_image;?>" width="60"
height="60"/></td>
<td><?php echo $pro_price;?></td>
<td><a href="edit_prod.php?edit_prod=<?php echo $pro_id;
?>">Edit</a></td>
<td><a href="delete_pro.php?delete_pro=<?php echo
$pro_id;?>">Delete</a></td>

</tr>
<?php } ?>
</table>
</form>
</div>

DELETE
<?php
include("includes/db.php");

if(isset($_GET['delete_pro'])){

$delete_id = $_GET['delete_pro'];

$delete_pro = "delete from products where pro_id='$delete_id'";

$run_delete = mysqli_query($con, $delete_pro);

LOWRY MEMORIAL COLLEGE Page 73


NEWLIGHT LODGING MANAGEMENT

if($run_delete){

echo "<script>alert('A product has been deleted!')</script>";


echo "<script>window.open('view_products.php?view_products','_self')</script>";
}

}
?>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");

$id = $_GET['del'];
//Delete the data from the table
$query = "delete from employee where emp_id = '$id'";

if(mysql_query($query)){

echo "<script>window.open('viewemployee.php?deleted=data has been


deleted...','_self')</script>";
}
?>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");

$id = $_GET['del'];
//Delete the data from the table

LOWRY MEMORIAL COLLEGE Page 74


NEWLIGHT LODGING MANAGEMENT

$query = "delete from booking where booking_id = '$id'";

if(mysql_query($query)){

echo "<script>window.open('booking.php?deleted=data has been deleted...','_self')</script>";


}
?>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");

$id = $_GET['del'];
//Delete the data from the table
$query = "delete from customer where cust_id = '$id'";

if(mysql_query($query)){

echo "<script>window.open('customerdetails.php?deleted=data has been


deleted...','_self')</script>";
}
?>
?

Update
<html>
<head>
<title>Customer Registration</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>

LOWRY MEMORIAL COLLEGE Page 75


NEWLIGHT LODGING MANAGEMENT

<?php
include("index.php");
?>

<div id="area">
<form action="edit.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>Customer
Registration</h1></td>
</tr>

<tr>
<td align="right" bgcolor="white">Customer Id:</td>
<td><input type="number" name="cust_id"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Customer Name:</td>
<td><input type="text" name="name"></td>
</tr>

<tr>
<td align="right" bgcolor="white">E-mail:</td>
<td><input type="text" name="email"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Password:</td>
<td><input type="text" name="password"></td>

LOWRY MEMORIAL COLLEGE Page 76


NEWLIGHT LODGING MANAGEMENT

</tr>

<tr>
<td align="right" bgcolor="white">Phone No.:</td>
<td><input type="text" name="phone_no"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Address:</td>
<td><input type="text" name="address"></td>
</tr>

<tr>
<td align="right" bgcolor="white">State:</td>
<td><input type="text" name="state"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Country:</td>
<td><input type="text" name="country"></td>
</tr>

<tr>
<td colspan="5" font="20px" align="center"><input type="submit"
name="submit" value="Update"></td>
</tr>

</table>

LOWRY MEMORIAL COLLEGE Page 77


NEWLIGHT LODGING MANAGEMENT

</form>
</div>
</body>
</html>

<?php

//connect to the database


mysql_connect("localhost","root","");
mysql_select_db("newlight");

[if(isset($_POST['submit'])){
$id = $_POST['cust_id'];
$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
$phone_no = $_POST['phone_no'];
$address = $_POST['address'];
$state = $_POST['state'];
$country = $_POST['country'];

//Insert the value in the booking table

$query ="update `customer` set


`cust_name`='$name',`email`='$email',`password`='$password',`phone_no`='$phone_no',`add
ress`='$address',`state`='$state',`country`='$country' where `cust_id`='$id'";

if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}

LOWRY MEMORIAL COLLEGE Page 78


NEWLIGHT LODGING MANAGEMENT

}
?>
<html>
<head>
<title>BOOKING</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>

<?php
include("index.php");
?>

<div id="area">
<form action="edit1.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>BOOKING</h1></td>
</tr>
<tr>
<td align="right" bgcolor="white">Booking Id:</td>
<td><input type="number" name="booking_id"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Customer Name:</td>
<td><input type="text" name="cust_name"></td>
</tr>

<tr>

LOWRY MEMORIAL COLLEGE Page 79


NEWLIGHT LODGING MANAGEMENT

<td align="right" bgcolor="white">Contact:</td>


<td><input type="text" name="contact"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Booking type:</td>
<td><input type="text" name="booking_type"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room Type:</td>
<td><input type="text" name="room_type"></td>
</tr>

<tr>
<td align="right" bgcolor="white">No_Of_Days:</td>
<td><input type="number" name="no_of_days"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Check In:</td>
<td><input type="date" name="check_in"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Check Out:</td>
<td><input type="date" name="check_out"></td>
</tr>

<tr>

LOWRY MEMORIAL COLLEGE Page 80


NEWLIGHT LODGING MANAGEMENT

<td align="right" bgcolor="white">Room No:</td>


<td><input type="number" name="room_no"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Adults:</td>
<td><input type="number" name="adults"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Children:</td>
<td><input type="number" name="children"></td>
</tr>

<tr>
<td colspan="5" font="20px" align="center"><input type="submit"
name="submit" value="Update"></td>
</tr>

</table>

</form>
</div>
</body>
</html>

<?php

LOWRY MEMORIAL COLLEGE Page 81


NEWLIGHT LODGING MANAGEMENT

//connect to the database


mysql_connect("localhost","root","");
mysql_select_db("newlight");

if(isset($_POST['submit'])){
$id = $_POST['booking_id'];
$name = $_POST['cust_name'];
$contact = $_POST['contact'];
$booking_type = $_POST['booking_type'];
$room_type = $_POST['room_type'];
$no_of_days = $_POST['no_of_days'];
$check_in = $_POST['check_in'];
$check_out = $_POST['check_out'];
$room_no = $_POST['room_no'];
$adults = $_POST['adults'];
$children = $_POST['children'];

//Insert the value in the booking table

$query ="update `booking` set


`cust_name`='$name',`contact`='$contact',`booking_type`='$booking_type',`room_type`='$ro
om_type',`no_of_days`='$no_of_days',`check_in`='$check_in',`check_out`='$check_out',`roo
m_no`='$room_no',`adults`='$adults',`children`='$children' where `booking_id`='$id'";

if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}

}
?>

LOWRY MEMORIAL COLLEGE Page 82


NEWLIGHT LODGING MANAGEMENT

<html>
<head>
<title>EMPLOYEE</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>

<?php
include("index.php");
?>

<div id="area">
<form action="edit2.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>Add
Employee</h1></td>
</tr>

<tr>
<td align="right" bgcolor="white">Employee Id:</td>
<td><input type="number" name="emp_id"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Employee Name:</td>
<td><input type="text" name="name"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Date_of_birth:</td>

LOWRY MEMORIAL COLLEGE Page 83


NEWLIGHT LODGING MANAGEMENT

<td><input type="text" name="dob"></td>


</tr>

<tr>
<td align="right" bgcolor="white">Age:</td>
<td><input type="text" name="age"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Phone No.:</td>
<td><input type="text" name="phone_no"></td>
</tr>

<tr>
<td align="right" bgcolor="white">E-mail:</td>
<td><input type="text" name="email"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Address:</td>
<td><input type="text" name="address"></td>
</tr>

<tr>
<td colspan="5" font="20px" align="center"><input type="submit"
name="submit" value="Update"></td>
</tr>

</table>

LOWRY MEMORIAL COLLEGE Page 84


NEWLIGHT LODGING MANAGEMENT

</form>
</div>
</body>
</html>

<?php

//connect to the database


mysql_connect("localhost","root","");
mysql_select_db("newlight");

if(isset($_POST['submit'])){
$id = $_POST['emp_id'];
$name = $_POST['name'];
$dob = $_POST['dob'];
$age = $_POST['age'];
$phone_no = $_POST['phone_no'];
$email = $_POST['email'];
$address = $_POST['address'];

//Insert the value in the booking table

$query ="update `employee` set


`emp_name`='$name',`date_of_birth`='$dob',`age`='$age',`phone_no`='$phone_no',`email`='$
email',`address`='$address' where `emp_id`='$id'";

if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}

LOWRY MEMORIAL COLLEGE Page 85


NEWLIGHT LODGING MANAGEMENT

}
?>
<html>
<head>
<title>ROOMS</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>

<?php
include("index.php");
?>

<div id="area">
<form action="edit3.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>Add
Rooms</h1></td>
</tr>

<tr>
<td align="right" bgcolor="white"> Id:</td>
<td><input type="number" name="id"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room No.:</td>
<td><input type="text" name="room_no"></td>
</tr>

LOWRY MEMORIAL COLLEGE Page 86


NEWLIGHT LODGING MANAGEMENT

<tr>
<td align="right" bgcolor="white">Category.:</td>
<td><input type="text" name="category"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room Type:</td>
<td><input type="text" name="room_type"></td>
</tr>

<tr>
<td align="right" bgcolor="white">No.Of Cots:</td>
<td><input type="text" name="no_of_cots"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room Charges(per day):</td>
<td><input type="text" name="room_charges"></td>
</tr>

<tr>
<td align="right" bgcolor="white">Room Service(per day):</td>
<td><input type="text" name="room_services"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit"
name="submit" value="Update"></td>
</tr>
</table>
</form>

LOWRY MEMORIAL COLLEGE Page 87


NEWLIGHT LODGING MANAGEMENT

</div>
</body>
</html>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");

if(isset($_POST['submit'])){
$id = $_POST['id'];
$room_no = $_POST['room_no'];
$category = $_POST['category'];
$room_type = $_POST['room_type'];
$no_of_cots = $_POST['no_of_cots'];
$room_charges = $_POST['room_charges'];
$room_services = $_POST['room_services'];

//Insert the value in the booking table


$query ="update `rooms` set
`room_no`='$room_no',`category`='$category',`room_type`='$room_type',`no_of_cots`='$no
_of_cots',`room_charges`='$room_charges',`room_services`='$room_services' where
`id`='$id'";

if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}
}
?>

LOWRY MEMORIAL COLLEGE Page 88


NEWLIGHT LODGING MANAGEMENT

8. SCREENSHOTS

USER

LOWRY MEMORIAL COLLEGE Page 89


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 90


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 91


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 92


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 93


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 94


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 95


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 96


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 97


NEWLIGHT LODGING MANAGEMENT

LOWRY MEMORIAL COLLEGE Page 98


NEWLIGHT LODGING MANAGEMENT

9. LIMITATIONS AND SYSTEM ENCHANCEMENT

Limitations:

Each and every system has some limitations that can restrict them to work in a Particular
environment.Though our system is provided high amount of accuracy and quick data
generation,there is still some limitations that led us to in greater deficiency on that
system.Some of the limitations that is observed during the process is:

 This system requires a knowledgable person to use the system.


 This system lacks interaction of members with the librarian.
 This system does not allow blocking of books online.
 This system does not manage the pricing of books.

Enhancements:

 In future our system can include good backup and restore facility.
 In future our system can include functions to block books online.
 In future you can add new modules like purchasing of old books.

LOWRY MEMORIAL COLLEGE Page 99


NEWLIGHT LODGING MANAGEMENT

10. BIBLIOGRAPHY

Reference Related to different websites:

1bestcsharp.blogspot.in
https://www.tutorialspoint.com
https://stackoverflow.com
https://www.w3schools.com
http://php.net
http://www.guru99.com
http://www.javatpoint.com
https://www.thesoftwareguy.in

LOWRY MEMORIAL COLLEGE Page 100

You might also like