You are on page 1of 61

Car Rental Services 2021

TABLE OF CONTENTS

ACKNOWLEDGEMENT 1
2
ABSTRACT
5
CHAPTER-1 Introduction
6
CHAPTER-2 System Analysis
6
2.1 Definition
6
2.2 Description of Existing system 6
2.2.1 Drawback of Existing system 7
2.3 Proposed System 7
2.4 Feasibility Analysis 7
2.4.1 Technical Feasibility 8
8
2.4.2 Economical Feasibility
8
2.4.3 Operational Feasibility
8
2.5 System Specifications
9
2.5.1 Hardware Description
10
2.5.2 Software Description 10
CHAPTER-3 Overview of the language used 10
3.1 About PHP 11
3.2 About HTML 11
3.2.1 HTML Tags 11

3.2.2 The structure of an HTML program 12


13
3.3 About JavaScript
3.4 About DBMS
3.5 About Operating System

1
Car Rental Services 2021

CHAPTER-4 System Modules 15


4.1 Admin Module 15
4.2 Staff Module 15
4.3 User Module 16
CHAPTER-5 System Design 17
17
5.1 Input Design
18
5.2 Output Design
19
5.3 Data Flow Diagram
33
5.4 Database Design
34
5.5 Tables 39
CHAPTER-6 Coding 39
6.1 Coding 39
6.2 Coding Validation and Optimization 40
6.3 Sample Codes 63
63
CHAPTER-7 Testing
64
7.1 Test Plans
64
7.1.1 Black Box Testing
64
7.1.2 White Box Testing
65
7.2 Unit Testing 65
7.3 Integration Testing 66
7.4 User Acceptance Testing 71
CHAPTER-8 Snapshots 72
CHAPTER-9 Future Enhancement 73

CHAPTER-10 Conclusion
CHAPTER-11 Bibliography

2
Car Rental Services 2021

CHAPTER-1

1.1 INTRODUCTION

We developed this project to book a car on rent at the fare charges. In present system all booking
work done manually and it takes very hard work to maintain the information of booking and cars. If
you want to find which vehicle is available for booking then it takes a lot of time. It only makes the
process more difficult and harder. This aim of the project is to automate the work performed in the car
rental service like generating daily bookings, records of car or cab available for booking, record of
rental charges for cars for every rout, store record of the customer.
Car rental service is a car booking software that provides a complete solution to all your day-to-day
car booking office running needs. This system helps you to keep the information of Customer online.
You can check your customer information any time by using this system. Car rental service system is
a unique and innovative product. Using this this you can also keep the information of number of
bookings in current month or in last 6 month or in last year. This helps you to track your business and
you earning in particular month or in any year. Based on this information you can take decision
regarding your business development.

1.1 Objective of the Project


The objective of the project is to automate vehicle rental ad reservation so that the customers do not
need to call and spend unnecessary time to reserve a vehicle.

• To transform the manual process of hiring car to a computerize system


• To validate the Rental car system using user satisfaction test
• To produce the documentation such as Software Requirement Specification (SRS), Software
Design Description as system development reference.

3
Car Rental Services 2021

CHAPTER 2

2.1 System Analysis


System Analysis is a detailed study of the various operations performed by a system and their
relationships within and outside of the system. Here the key question is- why all problems exist in the
present system? What must be done to solve the problem? Analysis begins when a user or manager
begins a study of the program using existing system. During analysis, data collected on the various files,
decision points and transactions handled by the present system. The commonly used tools in the system
are Data Flow Diagram etc. Training, experience and common sense are required for collection of
relevant information needed to develop the system. The success of the system depends largely on how
clearly the problem is defined, thoroughly investigated, and properly carried out through the choice of
solution. A good analysis model should provide not only the mechanisms of problem understanding but
also the frame work of the solution. Thus, it should be studied thoroughly by collecting data about the
system. Then the proposed system should be analyzed thoroughly in accordance with the needs. System
analysis can be categorized into four parts.
• System planning and initial investigation
• Applying analysis tools for structured analysis
• Feasibility study
• Cost/ Benefit analysis.

2.2 EXISTING SYSTEM


In this system user (or) client will directly interact with the car owner and owner will decide whether
the car is available or not. Then if it is available, he will give rent a car to the customer. The main
drawback of this system is customer need to meet the car owner. this is time waste process.
2.2.1 Drawback of Existing system:
• The new system is totally computerized system compare to existing system.
• A new system provides features like time efficiency to show car details, user profiles.

• Whatever the customer will give the feedback to the admin it will also show to admin but it is not
available in existing system so it is not so useful for upcoming generation.

• An inquiry can be easily done by user in the system where as existing system don’t provide this facility.

2.3 Proposed System:


In this car rental system, we are going to introduce online booking of car rent will be available. So, the
Burdon of the customer will be reduced. Our Aim is to design and create a data management System
for a car rental company. This enables admin can rent a vehicle that can be used by a customer. By
paying the money. This system increases customer retention. This software car Rental System has a
4
Car Rental Services 2021

very user-friendly interface. Thus, the users will feel very easy to work on it. By using this system admin
can manage their rental, payment, vehicle issues such as and insurance. The car information can be
added to the system by admin and admin will decide the money for car rent. it bases on the day. Vehicle
replacement is available if any problem that occurs in the vehicle.

2.4 Problem Analysis


This stage there is no existing system previously; we are developing a new system. Till now no system
is available with this type of features and facilities. This system is developed for the all types of users
with highly flexible and configurable product is envisaged to ensure global marketing

2.5 Design and Development Problem


• Problem in running XAMPP.
• To debug the error during the development.
• To show a relationship between entity.
• Minor error with database table.
2.6 Feasibility Analysis
A feasibility analysis is conducted once the problem is clearly understood. The purpose of the study is
to determine whether the problem is worth solving. It is an analysis and evaluation of a proposed project
to determine if it is technically feasible.

2.6.1 Economical Analysis


The economic feasibility of a system is used to evaluate the benefits achieved from and the costs
incurred for the project or system. This is done by a process called cost benefit analysis. It provides
tangible and intangible benefits like reduction in cost, more flexibility, faster activities, proper database
management, etc.

The application is medium scale application and is economically feasible for us to accomplish it. This
involves cost benefits analysis. Thus, there is no problem of high cost and cost benefits analysis.

2.6.2 Software Analysis


● Consumes a long-time for development of web application.
● Research and analysis cost to determine the actual need in real world.
● Implementation of application in the server and cost associated with the space in server.
2.6.3 Data Conversion
Another cost associated while implementing this web application is the data conversion. The previously
used software database must be stored and backup such that there will be no loss in implementing a new
web application which consumes time as well as money.

2.6.4 Operational Feasibility:


The system is operational feasible as the system can be operate by normal users with basic computer
skills without any additional trainings. We have developed this system with the willingness and ability
to create, manage and operate the system which is easy for the end users to operate it.
5
Car Rental Services 2021

2.7 System Specifications:


This document describes the requirement of the system. It is meant for use by the developers, and will
also be the basis for validating the final delivered system. Any changes made to the requirements in
the future will have to go through a formal change approval process. The developer is responsible for
asking the clarification, where necessary, and will not make any alterations without the permission of
the client. The developer is responsible for:
1. Developing the site.
2. Installing the software.
3. Conducting demonstrations about the usage.

2.7.1 Hardware Description:



Processor – Intel core i5/8th Gen

Hard Disk – 250 GB

Interface – basic keyboard/ Mouse

Memory – 4GB RAM
2.7.2 Software Description:

Scripting: HTML/CSS (front end)

Web server: Apache xampp

Server frame work: Bootstrap/JS

Database: My SQL/PHP (back end)

Operating system: Windows 8.1 or windows 10

6
Car Rental Services 2021

CHAPTER 3

OVERVIEW OF THE LANGUAGE USED

3.1 About PHP:

PHP is a server side scripting language designed for web development but also used as a general
purpose programming language. PHP is now installed on more than 244 million websites and 2.1 million
web servers. Originally created by Ramus Ledorf in 1995, the reference implementation of PHP is now
produced by the PHP group. While PHP originally stood for personal Home page, it now stands for
PHP: Hypertext Pre-processor, a recursive acronym. PHP code is interpreted by a web server with a
PHP processor module which generates the resulting web page. PHP commands can be embedded
directly into a HTML source document rather than calling an external file to process data. It has also
evolved to include a command-line interface capability and can be used in standalone incompatible with
the GNU General Public License (GPL) due to restrictions on the usage of the term PHP. PHP can be
deployed on most web servers and also as a standalone shell on almost every operating system and
platform, free of charge.

3.2 About HTML:

HTML stands for Hypertext Mark-up Language, was invented by Tim Burners Lee. It is a
simple text formatting language used to create hypertext documents. It is a platform independent
language unlike most other programming languages. HTML is neutral and can be used on any platform
or desktop. It is this feature of HTML that makes it popular as standard on the WWW. This versatile
language allows the creation of hypertext links, also known as hyperlinks. The language used to develop
web pages is called Hyper Text Mark-upLanguage (HTML). HTML is the language interpreted by a
browser. HTML is specified as TAGS in an HTML document (i.e. the web page).

3.2.1 HTML Tags:

Tags are instructions that are embedded directly into the text of the document. An HTML tag
is a signal to a browser that it should do something other than just throw text up on the screen. By
convention all HTML tags begin with an open angle bracket ().

7
Car Rental Services 2021

3.2.2 The structure of an HTML program:

Every HTML program has a rigid structure. The entire web page is enclosed within
<html> </html> tags. Within these tags two distinct sections are created using the <head> <
/head> tags and the <body> </body> tags.

3.3 About JavaScript:

JavaScript is an object based, cross-platform, loosely typed multiuse programming language


that is used to add interactivity to the web pages. A JavaScript is a program that is included on an HTML
page. Because it is enclosed in the <script> tag, the text of the script doesn't appear on the user's screen,
and the Web browser knows to run the JavaScript program. The <head> section of the HTML page.
Scripts that write text to the screen or that write HTML is best put in the body section. JavaScript allows
you create an active interface, giving the users feedback as they navigate your pages. JavaScript can be
used to make sure that your users enter valid information in forms, which can save time and money. If
the forms require calculations, you can do them in JavaScript the user's machine without needing to use
a complex server CGI.

With JavaScript, you have the ability to create custom HTML pages depending on actions that the user
takes. JavaScript controls the browser, because JavaScript has a set of date and time features. Java script
deals with commands called event handles. An action by the user on the page triggers an event handler
in your script. JavaScript is case sensitive. Scripts can be put in either of two places on an HTML pages:
between the <head> and </head> tag or between the <body> </body> tag.

One of the main uses of JavaScript is to provide feedback to people browsing your site. An alert window
can be created that pops up and gives the user the vitally important information that they need to know
about the page. Different languages versions can be have had on different scripts on one page. One
script might be for any JavaScript version, another for JavaScript1.1 and higher, and a third for
JavaScript1.2. In the case of JavaScript, the function is a set of JavaScript statements that performs a
task. Function can be called as many times as needed.

8
Car Rental Services 2021

3.4 About DBMS:

A database is a collection of inter related data stored with minimum redundancy to serve many users
quickly and efficiently. The general objective of database design is to make the database access easy,
inexpensive and flexible to the user. Database design is used to define and then specify the structure of
business used in the client/server system. A business object is nothing but information that is visible to
the users of the system. The database must be normalized one. Database design is one of the important
parts in developing software. It is a process of developing the conceptual model of data. It minimizes
the artificiality embedded in using separate files. It is a definition of the entire information content of
the organization and it specifies a relation between the data.

The primary objectives are fast response time to enquiries, more information at low cost, control of
redundancy, clarity and ease-of-use and program independence, accuracy and integrity of the system,
fast recovery, privacy and security of information and availability of powerful and user languages. For
designing a table, the analyst must decide the fields of the tables, types of the fields, field length, default
values etc. For this firstly the entity and relationship must be identified. Secondly, their attributes must
be specified. This method of organizing the data table is known as normalization.

The data structure can be later redefined through a normalization process that groups data in the simplest
way possible so that later changes can be made with ease. Normalization is designed to simplify
relationship and establish logical links between files without losing information. An inherit problem is
data redundancy and the inefficiency it generates. In other words, normalization implies splitting the
tables into two or more tables with fewer columns. Most designing techniques try to reach and a few
4NF, but many reach 5NF.

The six normalization rules are:

1NF – Each row or column must have a single value with no repeating values.
2NF – Each non-key column must depend on the primary key column.
3NF – No non-key column can depend on another non-key column.
BCNF – No attribute of a composite key depends on the attribute of another composite key.
4NF – An entity cannot have a 1:1 relation between key column and non-key column.
5NF – If and only if every non-trivial join dependency in it is implied by the candidate key.
It is also known as project join normal form.

9
Car Rental Services 2021

3.5 About Operating System:

This project work is done in Windows 10, which is the operating system. An operating system
is a set of software tools designed to make it easy for people or programmers to make optimum use of
the computer. People can be separated into two groups, users and programmers. The user wants a
convenient set of commands to manage files of data or programs, copy and run application packages
while a programmer uses a set of tools that can be held together and debug programs. No matter where
you are working, your computer will easier to use and manage, because Microsoft Windows 10 is more
compatible and powerful than any workstation you have used.
The main features of Windows 10 are:
1. Easier to use
2. Easier to manage
3. More compatible
4. More powerful

1. Easier to use:
With Windows 10, you can have faster access to information, and you are able to accomplish
tasks more quickly and easily.
Windows 10 makes it easier to:
1. Work with files
2. Find information.
3. Personalize computing environment.
4. Work remotely
2. Easier to manage:
You and your network administrators can work more efficiently now, because many of the most
common management tasks are streamlined with Windows 10.
With Windows 10 your workstation will be easier to:
Setup
Administrate
Support
3. More compatible:
Windows 10 offers increased compatibility. With different types of network and with wide
array of hardware and software.
Windows 10 also provides:
1. Improved driver support.
2. Increased support for new generation hardware multimedia technologies.
10
Car Rental Services 2021

4. More Powerful:
For all your computing needs Windows 10 provides:
1. Industrial-strength reliability.
2. The highest level of security.
3. Powerful performance.

11
Car Rental Services 2021

CHAPTER 4

MODULES AND THEIR DESCRIPTION


4.1 ADMIN:

Admin module allows project administrators to manage project members, companies, and
services, as well as edit the project profile.

Under this module there are several sub module

• 4.1.1 Dashboard: This module manages the pages inside it like, Registered users, Listed
Vehicle, Total Bookings, Listed Brands, Subscribers, Queries, Testimonials.

• 4.1.2 Brands: This module is further divided into two parts:


a. 4.1.2.1 Create Brands: Under this admin can add new brand of car.
b. 4.1.2.2 Manage Brands: In this admin can remove the brands which
are not required to be listed.

• 4.1.3 Vehicles: This module contains information about vehicle like brand, fuel type, price,And
model year of vehicle. It is also divided into two parts.

a. 4.1.3.1 Post a vehicle: Under this admin is able to post or add a new vehicle of
brands which he has created under brand module.

b. 4.1.3.2 Manage Vehicles: In this admin can manage all the vehicle that which
is available or he can remove the vehicle if it is not available.

• 4.1.4 Bookings: In this sub module admin can manage new bookings, that he has to confirm it
or cancel it on the basis of vehicle availability.This module is divided into three parts.
a. New: Here admin can see new bookings done by the user.
b. Confirmed: This page will show all the booking confirmed by admin.
c. Cancelled: This page will show all the bookings which has been cancelled.

• 4.1.5 Manage Testimonials: This module shows the feedback given by the users those who
Used our car rental service.

• 4.1.6 Contact us Queries: In this module admin can see the questions asked by the user who
are trying to contact and give the answers.

• 4.1.7 Registered Users: Here this module will show the all-registered user and new users.

• 4.1.8 Manage pages: This module used to manage pages which are: Terms and conditions,
Privacy policy, About us, FAQs.

• 4.1.9 Update Contact info: In this module admin can update his contact info anytime.
12
Car Rental Services 2021

• 4.1.10 Manage Subscribers: This is the last module of the admin panel where admin manages
the subscribers.

USER:
User module allows user to register himself with all the required details like first name, last name, email
id, phone no and so on. After that user can login and take benefits of CAR RENTAL SERVICES.

This module is further divided into three sub modules:

• User Registration: This module consists of Signup form through which user have to register
himself with all required details like: profile photo, full name, mobile no., email id, DOB,
address, city, country, dl-no, and password. After all this process user have to login himself to
the site to take the benefits of CAR RENTAL SERVICE.

• Vehicle Catalogue: This Sub module consists of all listed vehicle brands where user can Select
the vehicle of its own choice or in his budget with the type of specifications like fuel type,
model, and number of seats in it.

• Bookings: This booking module under user is different from admins booking modul Because
in this module only a particular user can see the bookings which are done by him.

13
Car Rental Services 2021

CHAPTER 5

SYSTEM DESIGN
5.1 Input Design:

The input is the set of values that is provided by the user to the system. The input design must enable
the user to provide the error free input to the system for efficient processing. The input design is the
process of converting the user-oriented inputs into computer based formats. The data fed into the system
using simple interactive forms. The forms have been supplied with messages so that user can enter data
without facing any difficulty. The data is validated wherever it requires in the project. The input data
have to be validated, edited, organized, and accepted by the system before being proposed to produce
the outputs.

The main objectives of input design are as follows:


1. Produce effective method of input.
2. Achieve high level accuracy.
3. Ensure that the input is acceptable and understood by the user.

The different types of input data handled by the system are:

EXTERNAL
They are the primary inputs to the system. The external input is what the user supplies to the system.
The user can give different types of external inputs in this project such as add new threads, post reply,
etc.
INTERNAL
When the external inputs are obtained from the user, these inputs are transferred to the system as
messages. These messages are captured and handled as input for further processing. In this project the
input design is done with PHP codes. The external inputs are data given to the system by the user such
as username and password for authentication process. The external input also includes the request as
per the users interest for displaying today’s, yesterdays and last week’s threads/posts and its replies.
The internal input covers the fetching of data from the database and it will be the input for displaying
the results of the screen.

14
Car Rental Services 2021

The necessary internal inputs are given to the system by Graphical User Interface (GUI) technology.
The GUI system applied to this project enables the user to avoid error and conclusion arises while
entering the input.

5.2 Output Design:

A quality output is one, which meets the requirements of the end user and presents the information
clearly. In any systems results of the processing are communicated to the user and to the other systems
through outputs design it is determined how the information is to be displayed for immediate need. It is
the most important and direct source information to the user. Efficient and intelligent output design
improves the systems relationship with the user and helps in decision making. The objective of the
output design is to convey the information of all the past activities, current status and to emphasize
important events.

The output generally refers to the results and information that is generated from the system. Outputs
from computers are required primarily to communicate the results of processing to the users. The result
for each query option that is submitted by the user, the system displays the output. The output that is
obtained for each query submitted should be tested before conforming the result.

15
Car Rental Services 2021

5.3 Use case Diagram


Use Case Diagram of the project and is a useful technique for identifying, clarifying, and organizing
system requirements. It describes how a user uses a system to accomplish a particular goal. Use cases
help ensure that the correct system is developed by capturing the requirements from the user's point of
view.

Use case Diagram

5.4 Sequence Diagram


A sequence diagram is a type of interaction diagram because it describes how—and in what order—a
group of objects works together. A sequence diagram specifically focuses on lifelines, or the processes
and objects that live simultaneously, and the messages exchanged between them to perform a function
before the lifeline ends.

Sequence Diagram of the project which is a type of interaction diagram because it describes how—and
in what order—a group of objects works together. A sequence diagram specifically focuses on lifelines,
or the processes and objects that live simultaneously, and the messages exchanged between them to
perform a function before the lifeline ends.

16
Car Rental Services 2021

Sequence Diagram

5.5 Data Flow Diagram:

A Data Flow Diagram (DFD) is a diagram that describes the flow of data and the processes that change
data throughout a system. It’s a structured analysis and design tool that can be used for flowcharting in
place of or in association with information. Oriented and process oriented system flowcharts. When
analysts prepare the Data Flow Diagram, they specify the user needs at a level of detail that virtually
determines the information flow into and out of the system and the required data resources. This network
is constructed by using a set of symbols that do not imply physical implementations. The Data Flow
Diagram reviews the current physical system, prepares input and output specification, specifies the
implementation plan etc.

17
Car Rental Services 2021

Throughout the project, the context flow diagrams, data flow diagrams and flow charts have been
extensively used to achieve the successful design of the system. In our opinion, “efficient design of the
data flow and context flow diagrams helps to design the system successfully without much major flaws
within the scheduled time”. This is the most complicated part in a project. In the designing process, our
project took more than the activities in the software life cycle. If we design a system efficiently with all
the future enhancements, the project will never become junk and it will be operational.

Four basic symbols are used to construct data flow diagrams. They are symbols that represent data
source, data flows, and data transformations and data storage. The points at which data are transformed
are represented by enclosed figures, usually circles, which are called nodes.

Main symbols used in the data flow diagram are:

1. Circle represents a process that transforms incoming data flows in to outgoing data flows.

2. A square defines a source and destination of system data.

3. Arrow identifies data in motion.

4. An open rectangle defines a data store, data at rest or temporary repository of data.

Steps to Construct Data Flow Diagrams:

18
Car Rental Services 2021

Four steps are commonly used to construct a DFD, They are:


1. Process should be named and numbered for easy reference. Each name should be
representative of the process.
2. The destination of flow is from top to bottom and from left to right.
3. When a process is exploded in to lower level details they are numbered.
4. The names of data stores, sources and destinations are written in capital letters.

Rules for constructing a Data Flow Diagram:


1. Process should be named and numbered for easy reference.
2. The direction of flow is from top to bottom and from left to right.
3. When a process is explored into lower level details they are numbered.
4. The name of data stores, sources and destinations are written in capital letter.

ZERO LEVEL DFD


5.6 Database Design:

A database is a collection of interrelated data stored with minimum redundancy to serve many users
quickly and efficiently. The general objective is to make information access easy, quick, inexpensive
and flexible for the users. The general theme behind a database is to integrate all the information. In
database design several specific objectives are considered: -

1. Controlled redundancy.
2. Ease of learning and use.

19
Car Rental Services 2021

3. Data independence.
4. Accuracy and integrity.
5. Recovery from failure.
6. Performance.

A database is an integrated collection of data which provides centralized access to the data. Usually the
centralized data managing the software is called RDBMS and the other DBMS is the separation of data
as seen by the program and data has stored in direct access to stores device. This is the difference
between logical and physical data

Design Consideration:

The system is analysed to the requirements and possible tables and fields are identified.
1. Identifying keys: Once we have drawn up the list of possible tables and fields, the next step in
the logic database is to identify and set foreign keys for each table.
2. Primary keys: A primary key consist of a field or a set of fields that uniquely identify each
record in that table. The “primary “field defines the primary key.
3. Foreign key: A foreign key comprises a field or multiple fields that links to the primary key of
another table.

Database Design and Tables:

Database is recognized as standard of MIS and is available virtually for every computer system. The
general theme behind a database is to integrate all the information. A database is an integrated collection
of data and provides centralized access to the data. Databases are designed to manage large bodies of
information. One of the major purposes of a database system is to provide users with an abstract view
of data. A database is designed so that it can be used both to specify the overall logical structure of the
database and provide a higher level description of the implementation. The database is structured in
fixed format records of several types. Each record type defines a fixed number of fields or attributes
and each field usually of a fixed length.

20
Car Rental Services 2021

5.7 Tables:

Admin

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It is storing the admin id

UserName varchar(100) No It will store the Admin logging id.

Password varchar(100) No It will store the admin password.

updationDate timestamp No It will store the password updating date.

Table booking

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No Booking id.

BookingNumber bigint(12) Yes It will store booking number.

userEmail varchar(100) Yes It will store the User email id.

VehicleId int(11) Yes It will store the vehicleID.

FromDate varchar(20) Yes It will store the pickup date.

ToDate varchar(20) Yes It will store the return date.

pickuptiming varchar(10) Yes It will store the pickup timing.

returntiming varchar(16) No It will store the return timing.

message varchar(255) Yes It will store the massage given by the user.

Status int(11) Yes It will store the booking status.

PostingDate timestamp No Posting date.

LastUpdationDate timestamp Yes Updating date.

21
Car Rental Services 2021

Table brands

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It will store the car brand id.

BrandName varchar(120) No It will store the car brand name

CreationDate timestamp Yes It will store the brand creations date.

UpdationDate timestamp Yes It will store the brand modification date.

Table contacat us info

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It will store the id.

Address tinytext Yes It will store the company’s address.

EmailId varchar(255) Yes It will store the company’s email id.

ContactNo char(11) Yes It will store the company’s contact no.

Table contact us query

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It will store the id.

name varchar(100) Yes It will store the name

EmailId varchar(120) Yes It will store the email id.

ContactNumber char(11) Yes It will store the contact number

Message longtext Yes It will store the user’s query.

PostingDate timestamp No Posting date

Status int(11) Yes Status.

22
Car Rental Services 2021

Table pages

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It will store the id.

PageName varchar(255) Yes It will store the page name.

type varchar(255) No It will store the page type.

detail longtext No It will store the contents of the pages.

Table payment

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(220) No It will store the id.

cardno varchar(225) No It will store the card number.

expdate date No It will store the exp date of the card.

cvvno int(3) No It will store the cvv number of the card

cname varchar(255) No It will store the card holder name

Table subscribers

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It will store the id.

SubscriberEmail varchar(120) Yes It will store the subscribers email id.

PostingDate timestamp Yes It will store the subscription date.

23
Car Rental Services 2021

Table testimonial

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It will store the id.

UserEmail varchar(100) No It will store the user email-id.

Testimonial mediumtext No It will store the testimonials massage.

PostingDate timestamp No It will store the posting date.

status int(11) Yes It will store the testimonials status.

Table users

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It will store the id.

FullName varchar(120) Yes It will store the username.

EmailId varchar(100) Yes It will store the user email-id.

Password varchar(100) Yes It will store the user password.

ContactNo char(11) Yes It will store the user contact number.

Dob varchar(100) Yes It will store the user date of birth.

Address varchar(255) Yes It will store the user address.

City varchar(100) Yes It will store the user city address.

Country varchar(100) Yes It will store the user country.

RegDate timestamp Yes It will store the user registration date.

UpdationDate timestamp Yes It will store the updating date of profile.

DL_NO varchar(50) No It will store the user driver-license.

Uimage1 varchar(220) Yes It will store the user profile image.

24
Car Rental Services 2021

Table vehicles

COLUMN TYPE NULL DESCRIPTION

id (Primary) int(11) No It will store the vehicle id.

VehiclesTitle varchar(150) Yes It will store the vehicle name.

VehiclesBrand int(11) Yes It will store the vehicle brand.

VehiclesOverview longtext Yes It will store the vehicle overview.

PricePerDay int(11) Yes It will store the vehicle rent price.

FuelType varchar(100) Yes It will store the vehicle fuel type.

ModelYear int(6) Yes It will store the vehicle model year.

SeatingCapacity int(11) Yes It will store the vehicle seating capacity.

Vimage1 varchar(120) Yes It will store the vehicle first image.

Vimage2 varchar(120) Yes It will store the vehicle second image.

Vimage3 varchar(120) Yes It will store the vehicle third image.

Vimage4 varchar(120) Yes It will store the vehicle fourth image.

Vimage5 varchar(120) Yes It will store the vehicle fifths image.

AirConditioner int(11) Yes It will store the vehicle air-conditioner status.

PowerDoorLocks int(11) Yes It will store the vehicle power door locks status.

It will store the vehicle antilock braking system


AntiLockBrakingSystem int(11) Yes
status.

BrakeAssist int(11) Yes It will store the vehicle brake-assist status.

PowerSteering int(11) Yes It will store the vehicle power steering status.

DriverAirbag int(11) Yes It will store the vehicle driver air bag status.

PassengerAirbag int(11) Yes It will store the vehicle passenger air bag status.

PowerWindows int(11) Yes It will store the vehicle power windows status.

25
Car Rental Services 2021

CDPlayer int(11) Yes It will store the vehicle cd player status.

CentralLocking int(11) Yes It will store the vehicle central-locking status.

CrashSensor int(11) Yes It will store the vehicle crash sensor status.

LeatherSeats int(11) Yes It will store the vehicle leather seats status.

RegDate timestamp No It will store the vehicle registration date.

UpdationDate timestamp Yes It will store the vehicle modification date.

26
Car Rental Services 2021

CHAPTER-6
CODING

6.1 Coding:

Coding is the phase of a software development project where developer’s actually in put the source code
into a computer that will be compiled into the final software program. Source code is the high level
language like C#, java, python etc. that is typed into an IDE (Interactive Development Environment)
and stored in the text file on the computer. This text file is compiled into machine code, which are the
instructions actually understood by the computer.

6.2 Coding Validation and Optimization:

It is verified whether the data entered in each form is added to the corresponding fields of the table. On
the press of ADD button, controls will appear on the form and on the press of SAVE button, the entered
data is saved.

The lower keys letters entered are detected and changed to upper case. Also numbers are not allowed to
be entered in the text boxes.

▪ Validation is the status of the project when the theoretical designs turned into a working system.
▪ It is used to reduce the number of loops in the program.
▪ Optimization is the last part of the system development life cycle.
▪ If the number of loops increases no. of executions also increases. Then there may be a chance
for the program to get stuck.

6.1 Sample Code:


Index.php

<?php

session_start();

include('includes/config.php');

error_reporting(0);
27
Car Rental Services 2021

?>

<!DOCTYPE HTML>

<html lang="en">

<head>

<title>Car Rental Portal</title>

<!--Bootstrap -->

<link rel="stylesheet" href="assets/css/bootstrap.min.css?v=<?php echo time(); ?>" type="text/css">

<link rel="stylesheet" href="assets/css/style.css?v=<?php echo time(); ?>" type="text/css">

<link rel="stylesheet" href="assets/css/owl.carousel.css?v=<?php echo time(); ?>" type="text/css">

<link rel="stylesheet" href="assets/css/owl.transitions.css?v=<?php echo time(); ?>" type="text/css">

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

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

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

<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css"


media="all" />

<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red"


media="all" data-default-color="true" />

<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange"


media="all" />

<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue"


media="all" />

<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink"


media="all" />

<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green"


media="all" />

<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple"


media="all" />
28
Car Rental Services 2021

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-


touch-icon-144-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-


touch-icon-114-precomposed.html">

<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-


touch-icon-72-precomposed.png">

<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-


precomposed.png">

<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">

<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">

</head>

<body onload="myFunction()">

<div id="loading"></div>

<!-- Start Switcher -->

<?php include('includes/colorswitcher.php');?>

<!-- /Switcher -->

<!--Header-->

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

<!-- /Header -->

<!-- Banners -->

<section id="banner" class="banner-section">

<section class="showcase">

<div class="video-container">

<video src="video/car (1).mp4" autoplay muted loop></video>

</div>

<div class="container">

<div class="div_zindex">

29
Car Rental Services 2021

<div class="row">

<div class="col-md-5 col-md-push-7">

<div class="banner_content">

<h1>Find the right car for you.</h1>

<p>We have more than a thousand cars for you to choose. </p>

<a href="video.php" class="btn">Read More <span class="angle_arrow"><i class="fa fa-


angle-right" aria-hidden="true"></i></span></a> </div>

</div>

</div>

</div>

</div>

</div>

</section>

</section>

<!-- /Banners -->

<!-- Resent Cat-->

<section class="section-padding gray-bg">

<div class="container">

<div class="section-header text-center">

<h2>Find the Best <span>CarForYou</span></h2>

<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered
alteration in some form, by injected humour, or randomised words which don't look even slightly
believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything
embarrassing hidden in the middle of text.</p>

</div>

<div class="row">

30
Car Rental Services 2021

<!-- Nav tabs -->

<div class="recent-tab">

<ul class="nav nav-tabs" role="tablist">

<li role="presentation" class="active"><a href="#resentnewcar" role="tab" data-


toggle="tab">New Car</a></li>

</ul>

</div>

<!-- Recently Listed New Cars -->

<div class="tab-content">

<div role="tabpanel" class="tab-pane active" id="resentnewcar">

<?php $sql = "SELECT


tblvehicles.VehiclesTitle,tblbrands.BrandName,tblvehicles.PricePerDay,tblvehicles.FuelType,tblvehic
les.ModelYear,tblvehicles.id,tblvehicles.SeatingCapacity,tblvehicles.VehiclesOverview,tblvehicles.Vi
mage1 from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand limit 12";

$query = $dbh -> prepare($sql);

$query->execute();

$results=$query->fetchAll(PDO::FETCH_OBJ);

$cnt=1;

if($query->rowCount() > 0)

foreach($results as $result)

?>

<div class="col-list-3">

<div class="recent-car-list">

31
Car Rental Services 2021

<div class="car-info-box"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result-


>id);?>"><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>"
class="img-responsive" alt="image"></a>

<ul>

<li><i class="fa fa-car" aria-hidden="true"></i><?php echo htmlentities($result->FuelType);?></li>

<li><i class="fa fa-calendar" aria-hidden="true"></i><?php echo htmlentities($result->ModelYear);?>


Model</li>

<li><i class="fa fa-user" aria-hidden="true"></i><?php echo htmlentities($result-


>SeatingCapacity);?> seats</li>

</ul>

</div>

<div class="car-title-m">

<h6><a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"> <?php echo


htmlentities($result->VehiclesTitle);?></a></h6>

<span class="price"> &#8377 <?php echo htmlentities($result->PricePerDay);?> /Day</span>

</div>

<div class="inventory_info_m">

<p><?php echo substr($result->VehiclesOverview,0,70);?></p>

</div>

</div>

</div>

<?php }}?>

</div>

</div>

</div>

</section>

<!-- /Resent Cat -->

32
Car Rental Services 2021

<!-- Fun Facts-->

<section class="fun-facts-section">

<div class="container div_zindex">

<div class="row">

<div class="col-lg-3 col-xs-6 col-sm-3">

<div class="fun-facts-m">

<div class="cell">

<h2><i class="fa fa-calendar" aria-hidden="true"></i>40+</h2>

<p>Years In Business</p>

</div>

</div>

</div>

<div class="col-lg-3 col-xs-6 col-sm-3">

<div class="fun-facts-m">

<div class="cell">

<h2><i class="fa fa-car" aria-hidden="true"></i>200+</h2>

<p>New Cars Are available</p>

</div>

</div>

</div>

<div class="col-lg-3 col-xs-6 col-sm-3">

<div class="fun-facts-m">

<div class="cell">

<h2><i class="fa fa-car" aria-hidden="true"></i>100+</h2>

<p>Branches</p>

</div>

33
Car Rental Services 2021

</div>

</div>

<div class="col-lg-3 col-xs-6 col-sm-3">

<div class="fun-facts-m">

<div class="cell">

<h2><i class="fa fa-user-circle-o" aria-hidden="true"></i>600+</h2>

<p>Satisfied Customers</p>

</div>

</div>

</div>

</div>

</div>

<!-- Dark Overlay-->

<div class="dark-overlay"></div>

</section>

<!-- /Fun Facts-->

<!--Testimonial -->

<section class="section-padding testimonial-section parallex-bg">

<div class="container div_zindex">

<div class="section-header white-text text-center">

<h3>Our Satisfied <span>Customers</span></h3>

</div>

<div class="row">

<div id="testimonial-slider">

<?php

$tid=1;

34
Car Rental Services 2021

$sql = "SELECT tbltestimonial.Testimonial,tblusers.FullName,Vimage1 from tbltestimonial join


tblusers on tbltestimonial.UserEmail=tblusers.EmailId where tbltestimonial.status=:tid limit 4";

$query = $dbh -> prepare($sql);

$query->bindParam(':tid',$tid, PDO::PARAM_STR);

$query->execute();

$results=$query->fetchAll(PDO::FETCH_OBJ);

$cnt=1;

if($query->rowCount() > 0)

foreach($results as $result)

{ ?>

<div class="testimonial-m">

<img src="uploads/<?php echo htmlentities($result->Vimage1);?>" class="testimonial-img"


width="280" height="200" alt="" />

<div class="testimonial-content">

<div class="testimonial-heading">

<h5><?php echo htmlentities($result->FullName);?></h5>

<p><?php echo htmlentities($result->Testimonial);?></p>

</div>

</div>

</div>

<?php }} ?>

</div>

35
Car Rental Services 2021

</div>

</div>

<!-- Dark Overlay-->

<div class="dark-overlay"></div>

</section>

<!-- /Testimonial-->

<!--Footer -->

<?php include('includes/footer.php');?>

<!-- /Footer-->

<!--Back to top-->

<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-


hidden="true"></i> </a> </div>

<!--/Back to top-->

<!--Login-Form -->

<?php include('includes/login.php');?>

<!--/Login-Form -->

<!--Register-Form -->

<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->

<?php include('includes/forgotpassword.php');?>

<!--/Forgot-password-Form -->

<!-- Scripts -->

<script src="assets/js/jquery.min.js"></script>
36
Car Rental Services 2021

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

<script src="assets/js/interface.js"></script>

<!--Switcher-->

<script src="assets/switcher/js/switcher.js"></script>

<!--bootstrap-slider-JS-->

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

<!--Slider-JS-->

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

<script src="assets/js/owl.carousel.min.js"></script>

<script>

$(document).ready(function(){

$('div#loading').removeAttr('id');

});

var preloader = document.getElementById("loading");

window.addEventListener('load', function(){

preloader.style.display = 'none';

})

function myFunction(){

preloader.style.display = 'none';

};

</script>

</body>

</html>

37
Car Rental Services 2021

Login.php
<?php

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

$email=$_POST['email'];

$password=md5($_POST['password']);

$sql ="SELECT EmailId,Password,FullName FROM tblusers WHERE EmailId=:email and Password


=:password";

$query= $dbh -> prepare($sql);

$query-> bindParam(':email', $email, PDO::PARAM_STR);

$query-> bindParam(':password', $password, PDO::PARAM_STR);

$query-> execute();

$results=$query->fetchAll(PDO::FETCH_OBJ);

if($query->rowCount() > 0)

$_SESSION['login']=$_POST['email'];

$_SESSION['fname']=$results->FullName;

$currentpage=$_SERVER['REQUEST_URI'];

echo "<script type='text/javascript'> document.location = '$currentpage'; </script>";

} else{

echo "<script>alert('Invalid Details');</script>";

38
Car Rental Services 2021

?>

<div class="modal fade" id="loginform">

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

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-


hidden="true">&times;</span></button>

<h3 class="modal-title">Login</h3>

</div>

<div class="modal-body">

<div class="row">

<div class="login_wrap">

<div class="col-md-12 col-sm-6">

<form method="post">

<div class="form-group">

<input type="email" class="form-


control" name="email" required="required" placeholder="Email address*">

</div>

<div class="form-group">

<input type="password" class="form-


control" name="password" required="required" placeholder="Password*">

</div>

<div class="form-group checkbox">

<input type="checkbox" id="remember">

</div>

<div class="form-group">
39
Car Rental Services 2021

<input type="submit" name="login" value="Login" class="btn btn-block">

</div>

</form>

</div>

</div>

</div>

</div>

<div class="modal-body text-center">

<p>Don't have an account? <a href="#signupform" data-toggle="modal" >Signup Here</a></p>

<p><a href="#forgotpassword" data-toggle="modal" data-


dismiss="modal">Forgot Password ?</a></p>

</div>

</div>

</div>

</div>

registration.php
<?php

//error_reporting(0);

if(isset($_POST['signup']))

$vimage1=$_FILES["img1"]["name"];

$fname=$_POST['fullname'];

$email=$_POST['emailid'];

$mobile=$_POST['mobileno'];

40
Car Rental Services 2021

$dob=$_POST['dob'];

$adress=$_POST['adress'];

$city=$_POST['city'];

$country=$_POST['country'];

$dlno=$_POST['dlno'];

$password=md5($_POST['password']);

move_uploaded_file($_FILES["img1"]["tmp_name"],"uploads/".$_FILES["img1"]["name"]);

$sql="INSERT INTO tblusers(FullName,EmailId,ContactNo,Password,dob,Address,City,Country,D


L_NO,Vimage1) VALUES(:fname,:email,:mobile,:password,:dob,:adress,:city,:country,:dlno,:vimage
1)";

$query = $dbh->prepare($sql);

$query->bindParam(':fname',$fname,PDO::PARAM_STR);

$query->bindParam(':email',$email,PDO::PARAM_STR);

$query->bindParam(':mobile',$mobile,PDO::PARAM_STR);

$query->bindParam(':password',$password,PDO::PARAM_STR);

$query->bindParam(':dob',$dob,PDO::PARAM_STR);

$query->bindParam(':adress',$adress,PDO::PARAM_STR);

$query->bindParam(':city',$city,PDO::PARAM_STR);

$query->bindParam(':country',$country,PDO::PARAM_STR);

$query->bindParam(':dlno',$dlno,PDO::PARAM_STR);

$query->bindParam(':vimage1',$vimage1,PDO::PARAM_STR);

$query->execute();

$lastInsertId = $dbh->lastInsertId();
41
Car Rental Services 2021

if($lastInsertId)

echo "<script>alert('Registration successfull. Now you can login');</script>";

else

echo "<script>alert('Something went wrong. Please try again');</script>";

?>

<script>

function checkAvailability() {

$("#loaderIcon").show();

jQuery.ajax({

url: "check_availability.php",

data:'emailid='+$("#emailid").val(),

type: "POST",

success:function(data){

$("#user-availability-status").html(data);

$("#loaderIcon").hide();

},

error:function (){}

});

</script>

<script type="text/javascript">

42
Car Rental Services 2021

function PreviewImage() {

var oFReader = new FileReader();

oFReader.readAsDataURL(document.getElementById("img1").files[0]);

oFReader.onload = function (oFREvent) {

document.getElementById("uploadPreview").src = oFREvent.target.result;

};

};

</script>

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

<div class="modal fade" id="signupform">

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

<div class="modal-content">

<div class="modal-header">

<form method="post" class="form-horizontal" enctype="multipart/form-data">

<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-


hidden="true">&times;</span></button>

<h3 class="modal-title">Sign Up</h3>

</div>

<div class="modal-body">

<div class="row">

<center>

<img id="uploadPreview" src="imgs/avatar.png" class="avatar" width="140px"

text-align="center" /><br>
43
Car Rental Services 2021

</center>

<div class="signup_wrap">

<div class="col-md-12 col-sm-6">

<form method="post" name="signup" onSubmit="return valid();">

<div class="form-group">

<input type="file" id="img1" name="img1" accept=".jpg,.jpeg,.png" required="required" onc


hange="PreviewImage();"> <span style="color:red">Upload your profile photo</span>

</div>

<div class="form-group">

<span>Full Name*</span>

<input type="text" class="form-control" pattern="[A-Za-


z]{1,15}" title="Name field can not have the number" name="fullname" placeholder="Full Name" re
quired="required">

</div>

<div class="form-group">

<span>Mobile No*</span>

<input pattern="[0-9]{10}" title="Enter the valid mobile number" class="form-


control" name="mobileno" placeholder="e.g-7236000339" required="required">

</div>

<div class="form-group">

<span>Email-id*</span>

<input type="email" class="form-


control" name="emailid" id="emailid" onBlur="checkAvailability()" placeholder="user@gmail.com"
required="required">

<span id="user-availability-status" style="font-size:12px;"></span>

44
Car Rental Services 2021

</div>

<div class="form-group">

<span>Date-Of-Birth*</span>

<input type="date" class="form-control" id="TxtFrom" name="dob" max="2002-01-


02" placeholder="Date of Birth" required="required">

</div>

<div class="form-group">

<span>Address*</span>

<input type="text" class="form-


control" name="adress" placeholder="Your Address" required="required">

</div>

<div class="form-group">

<span>City*</span>

<input type="text" class="form-


control" name="city" placeholder="City" required="required">

</div>

<div class="form-group">

<span>Country*</span>

<input type="text" class="form-


control" name="country" placeholder="Country" required="required">

</div>

<div class="form-group">

<span>DL-NO*</span>

45
Car Rental Services 2021

<input type="text" class="form-


control" name="dlno" maxlength="13" minlength="13" placeholder="Dl_No" required="required">

</div>

<div class="form-group">

<span>Password*</span>

<input type="text" class="form-control" name="password" pattern="(?=.*\d)(?=.*[a-


z])(?=.*[A-
Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least
8 or more characters" placeholder="Password" required="required">

</div>

<div class="form-group checkbox">

<input type="checkbox" id="terms_agree" required="required" checked="">

<label for="terms_agree">I Agree with <a href="page.php?type=terms">Terms and Condi


tions</a></label>

</div>

<div class="form-group">

<input type="submit" value="Sign Up" name="signup" id="submit" class="btn btn-


block">

</div>

</form>

</div>

</div>

</div>

</div>

46
Car Rental Services 2021

<div class="modal-body text-center">

<p>Already got an account? <a href="login.php" data-dismiss="modal">Login Here</a></p>

</div>

</div>

</div>

</div>

check_availability.php
<?php

require_once("includes/config.php");

// code user email availablity

if(!empty($_POST["emailid"])) {

$email= $_POST["emailid"];

if (filter_var($email, FILTER_VALIDATE_EMAIL)===false) {

echo "<span style='color:red'>error : Invalid email.</span>";

else {

$sql ="SELECT EmailId FROM tblusers WHERE EmailId=:email";

$query= $dbh -> prepare($sql);

$query-> bindParam(':email', $email, PDO::PARAM_STR);

$query-> execute();

$results = $query -> fetchAll(PDO::FETCH_OBJ);

$cnt=1;

if($query -> rowCount() > 0)

47
Car Rental Services 2021

echo "<span style='color:red'> Email already exists .</span>";

echo "<script>$('#submit').prop('disabled',true);</script>";

} else{

echo "<span style='color:green'> Email available for Registration .</span>";

echo "<script>$('#submit').prop('disabled',false);</script>";

if(!empty($_POST["TxtFrom"])) {

$ret="SELECT * FROM tblbooking where (:fromdate BETWEEN date(FromDate) and date(ToDate)


|| :todate BETWEEN date(FromDate) and date(ToDate) || date(FromDate) BETWEEN :fromdate and :
todate) and VehicleId=:vhid";

$query1 = $dbh -> prepare($ret);

$query1->bindParam(':vhid',$vhid, PDO::PARAM_STR);

$query1->bindParam(':fromdate',$fromdate,PDO::PARAM_STR);

$query1->bindParam(':todate',$todate,PDO::PARAM_STR);

$query1->bindParam(':BookingNumber',$BookingNumber,PDO::PARAM_STR);

$query1->execute();

$results1=$query1->fetchAll(PDO::FETCH_OBJ);

$cnt=1;

if($query1->rowCount()>0)

if($fromdate && $todate="$BookingNumber" )

48
Car Rental Services 2021

echo "<span style='color:red'> Email already exists .</span>";

echo "<script>$('#submit').prop('disabled',true);</script>";

else{

echo "<span style='color:green'> Email available for Registration .</span>";

echo "<script>$('#submit').prop('disabled',false);</script>";

?>

payment.php
<?php

include('includes/config.php');

//error_reporting(0);

if(isset($_POST['signup']))

$cnno=$_POST['cn'];

$exp=$_POST['expdate'];

$cv=$_POST['cvvno'];

$name=($_POST['cname']);

$sql="INSERT INTO tblpayment(cardno,expdate,cvvno,cname) VALUES(:cnno,:exp,:cv,:name)";

$query = $dbh -> prepare($sql);

$query->bindParam(':cnno',$cnno,PDO::PARAM_STR);

49
Car Rental Services 2021

$query->bindParam(':exp',$exp,PDO::PARAM_STR);

$query->bindParam(':cv',$cv,PDO::PARAM_STR);

$query->bindParam(':name',$name,PDO::PARAM_STR);

$query->execute();

$lastInsertId = $dbh->lastInsertId();

if($lastInsertId)

echo "<script>alert('payment successfull. ');</script>";

echo "<script>alert('Booking successfull.');</script>";

echo "<script type='text/javascript'> document.location = 'my-booking.php'; </script>";

else

echo "<script>alert('Something went wrong. Please try again');</script>";

?>

<header>

<div class="col-sm-3 col-md-2">

<div class="logo"> <a href="index.php"><img src="assets/images/logo.png"


alt="image"/></a> </div>

</div>

</header>

<!DOCTYPE html>

<html>

<head>
50
Car Rental Services 2021

<meta charset = "utf-8" />

<title>car rental services payment mode</title>

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

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

<link rel = "stylesheet" type = "text/css" href = "payment/font-awesome/css/font-awesome.min.css" />

<script type = "text/javascript" src = "js/jquery-1.10.2.min.js"></script>

<script type = "text/javascript" src = "bootstrap/js/bootstrap.min.js"></script>

</head>

<body>

<div class = "container">

<div class = "page-header">

<h1>Car Rental Services <small>Payment Mode</small></h1>

</div>

<!-- Credit Card Payment Form - START -->

<div class = "container">

<div class = "row">

<div class = "col-xs-12 col-md-4 col-md-offset-4">

<div class = "panel panel-default">

<div class = "panel-heading">

<div class = "row">

<h3 class = "text-center">Payment Details</h3>

<img class = "img-responsive cc-img" src =


"http://www.prepbootstrap.com/Content/images/shared/misc/creditcardicons.png">

</div>

</div>

<div class = "panel-body">


51
Car Rental Services 2021

<div class = "row">

<div class = "col-xs-12">

<form action="" method="post" name="signup" onSubmit="return valid();" >

<div class = "form-group">

<label>CARD NUMBER</label>

<div class = "form-group">

<input pattern="\d*" maxlength="16" class = "form-control" name = "cn" placeholder = "Valid Card
Number" required = "required">

</div>

<span class = "input-group-addon"><span class = "fa fa-credit-card"></span></span>

</div>

</div>

</div>

</div>

<div class = "row">

<div class = "col-xs-7 col-md-7">

<div class = "form-group">

<label><span class = "hidden-xs">Expiry</span><span class = "visible-xs-inline">EXP</span> /


Validity Date</label>

<input class = "form-control" id="TxtFrom" name = "expdate" placeholder = "MM / YY"


required="required" />

</div>

</div>

<div class = "col-xs-5 col-md-5 pull-right">

<div class = "form-group">

<label>CVV </label>

<input pattern="\d*" maxlength="3" class = "form-control" name = "cvvno" placeholder = "CVV "
required="required" />

52
Car Rental Services 2021

</div>

</div>

</div>

<div class = "row">

<div class = "col-xs-12">

<div class = "form-group">

<label>Name On Card</label>

<input type = "text" id="cname" class = "form-control" name = "cname" placeholder = "Card Owner
Names" required="required" />

</div>

</div>

</div>

</div>

<div class = "panel-footer">

<div class = "row">

<div class = "col-xs-12">

<div class="form-group">

<input type="submit" value="Pay Now" name="signup" style="background-color:green" class="btn


btn-block">

</form>

</div>

</div>

</div>

</div>

</div>

</div>

53
Car Rental Services 2021

</div>

</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<link rel="stylesheet"
href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">

<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>

<script>

$(function(){

$("#TxtFrom").datepicker({

numberOfMonths:1,

minDate:0,

// maxDate:2 ,

dateFormat:'yy-mm-dd',

onSelect:function(selectdate){

var dt = new Date(selectdate);

dt.setDate(dt.getDate()+1)

$("#TxtTo").datepicker("option","minDate",dt);

});

$("#TxtTo").datepicker({

numberOfMonths:1,

minDate:1,

dateFormat:'yy-mm-dd',

onSelect:function(selectdate){

var dt=new Date(selectdate);

dt.setDate(dt.getDate()-1)

$("#TxtFrom").datepicker("option","maxDate",dt);
54
Car Rental Services 2021

});

});

</script>

<style>

.cc-img {

margin: 0 auto;

</style>

<!-- Credit Card Payment Form - END -->

<!-- <?php include('includes/login.php');?> -->

</body>

</html>

55
Car Rental Services 2021

CHAPTER 7
TESTING
7.1 Test Plans:

Software Testing is the process of executing software in a controlled manner, in order to answer the
question -Does the software behave as specified? Software testing is often used in association with the
terms verification and validation. Validation is the checking or testing of items, includes software, for
conformance and consistency with an associated specification. Software testing is just one kind of
verification, which also uses techniques such as reviews, analysis, inspections, and walkthroughs.
Validation is the process of checking that what has been specified is what the user actually wanted.

Validation: Are we doing the right job?

Verification: Are we doing the job right?

Software testing should not be confused with debugging. Debugging is the process of analysing and
localizing bugs when software does not behave as expected. Although the identification of some bugs
will be obvious from playing with the software, a methodical approach to software testing is a much
more thorough means for identifying bugs.
Other activities which are often associated with software testing are static analysis and dynamic
analysis. Static analysis investigates the source code of software, looking for problems and gathering
metrics without actually executing the code. Dynamic analysis looks at the behaviour of software while
it is executing, to provide information such as execution traces, timing profiles, and test coverage
information.

7.1.1 Black Box Testing:

Black box testing, also called behavioural testing, focuses on the functional requirements of software.
This testing approach enables the software engineer to derive the input conditions that will fully exercise
all requirements for a program. Black box testing attempts to find the errors like:
1. Incorrect or missing functions.

56
Car Rental Services 2021

2. Interface errors.
3. Errors in data structures or external database access.
4. Behaviour or performance errors.
5. Initialization and termination errors.
In Black box testing software is exercised over a full range of inputs and outputs are observed for
correctness.

7.1.2 White Box Testing:


White box testing is also called Glass box testing is a test case design control; structure of the procedural
design to derive test cases using White box testing method, the software engineer can derive the test
cases that guarantee that all independent paths within the module have been exercised at least once.
Exercise all logic decisions on their true or false sides. Execute all loops at their boundaries and within
their operational bounds. Exercise internal data structure to ensure their validity. The first level of test
is unit testing. The purpose of unit testing is to ensure that each program is fully tested.

7.2 Unit Testing:

In the unit test case will be testing the separate modules of the software. We will carry out black box
testing where each module or component of software is tested individually. We will test the component
by passing data through it and we will be monitoring data to find the errors. We will make sure that the
component work without any troubles. The test primarily is carried out by the programmer who
designed and implemented the module. Lead tester is carried out by the programmers who test the
modules to finalize the testing.

7.3 Integration Testing:

In the Integration testing we will combine the different tested modules and we will test the bundle of
module. This is to ensure that the entire modules are working correctly in conjunction with the other
modules. Data can be lost across any interface; one module can have adverse effect on another. Sub
function when combined, may not produce the desired major function. Integration testing is a systematic
testing for conducting test to uncover errors associated within the interface. The objective is to take unit
tested modules and build a program structure. All the modules are combined and tested as a whole. Here
correction is difficult because vast expense of the entire program complicates the isolation of causes.

57
Car Rental Services 2021

7.4 User Acceptance Testing:

System validation checks for equality of the software in both simulated and live environments. First,
the software goes through a phase, in which errors and failures based on simulated user requirements
are verified and studies. This is called alpha testing.

58
Car Rental Services 2021

CHAPTER 8
SNAP SHOTS
1.1 Front end
Login page

Home page

59
Car Rental Services 2021

1.2 Backend

Admin Login page

Manage Vehicles

60
Car Rental Services 2021

Add Brand

61

You might also like