U99-E-Toll Online Toll Plaza Booking System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 90

E-Toll: Online Toll plaza Booking System

Abstract
In day to day life, Millions of drivers pass through the toll booth to pay toll tax. Manual
process is too much time consuming, so we go for electronic toll plaza. Toll Plaza Management
system is a web based application that can provide all the information related to toll plazas and
the passenger checks in either online or on a mobile device and pays the amount, then the
passenger will be provided a receipt. With this receipt the passenger can leave the toll booth
without waiting for any verification call. If the user selects a place from source to destination, the
number of toll gates in between will be displayed with the specified amount. The user pays the
payment via online payment gateway. This system explains the implantation of automation in
toll plaza which is a step towards improving the user to pay the amount for travelling in
predetermined routes.
INTRODUCTION

The increase in the number of vehicles on road, the task of traffic management becomes
more complex. It is hard to keep & maintain the details of the each vehicle, which is running on
the road. Also in case of hit and run or carrying of illegal goods over inter-state cross boarder or
road-robbery cases, the police may not trace the culprits very easily, as the vehicle details are not
monitored continuously. Suppose The Cargo Company wants to send a message to its On-road
vehicle to stop delivering the goods to customer, policeman want to stop a vehicle which is
smuggling some illegal goods or city transports want to track each buses details such as
departure and arrival time on bus terminal, number of round trips it has undergone in a single
day. All this is possible by the use of automated toll gates. This system is intended to help the
RTO, Police Department, Public Transport and Cargo Companies to track the vehicles with the
movement of inter-State vehicles and goods, there is rise in the number of toll roads and bridges.
Which overall increases the load on highway roads. Hence scientific tracking and monitoring
system becomes a need of the toll tax department. The proper collection of toll fees can generate
a huge quantum of funds for the maintenance of aging bridges and the large road network. Hence
to improve the toll tax collection system and to reduce the traffic at toll tax depots we will
develop a system called No Queue Toll Tax Collection System.
SYSTEM STUDY
EXISTING SYSTEM
A toll road doesn't stay a toll road forever. Tolls may be removed, once the cost of
construction has been recovered from the toll amount is collected. All highway toll plazas are
manually operated, where an operator collects cash from the driver and provides a receipt. This
procedure can be slow, which often results in traffic jams at the toll plazas on busy highways.
Every day, millions of people use their personal vehicles instead of public transport systems and
due to this, there is increase in traffic in developing countries. Increasing number of vehicles on
the roads, result into many problems such as congestion, air pollution and fuel wastage etc.
Disadvantage
 This is not a user friendly process
 There may be a chance for entering wrong information.
 This system will not reduce traffic jam
PROPOSED SYSTEM
Our proposed system is used to reduce the over congestion of traffic in the metropolitan
cities. A mobile device and pays the amount, then the passenger will be provided a receipt. With
this receipt the passenger can leave the toll booth without waiting for any verification call. If the
user selects a place from source to destination, the number of toll gates in between will be
displayed with the specified amount. so user don’t need to wait in tollgate. And User can view
the upcoming tollgate on their way so that they can pay in online through our application. User
can buy toll plaza tickets by online for more than one toll plaza.
Advantage

 Decreases the fuel-consumption


 Relieves the traveler of the burden of waiting in the queue.
 Man power reduction
 Easy in usage and simple to carry in mobile device
 Highly secured and reliable
 Saves time
SYSTEM ANALYSIS & REQUIREMENT SPECIFICATION
Hardware Specification:
 Processor : Intel processor 3.0 GHz
 RAM : 2GB
 Hard disk : 500 GB
 Compact Disk : 650 Mb
 Keyboard : Standard keyboard
 Mouse : Logitech mouse
 Monitor : 15 inch color monitor

Software Specification:

 Front End : PHP


 Back End : MYSQL
 Server : WAMP
 Operating System : Windows OS
 System type : 32-bit or 64-bit Operating System
 IDE : Dreamweaver 8.0
 DLL : Depends upon the title
ABOUT SOFTWARE

PHP – Overview

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 e-commerce sites. The PHP Hypertext Preprocessor (PHP) is
a programming language that allows web developers to create dynamic content that interacts
with databases. PHP is basically used for developing web based software applications. This
tutorial helps you to build your base with PHP.

Why to Learn PHP?

PHP started out as a small open source project that evolved as more and more people
found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in
1994.

PHP is a MUST for students and working professionals to become a great Software
Engineer specially when they are working in Web Development Domain. I will list down some
of the key advantages of learning 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 e-commerce 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 architectures (COM and CORBA), making n-tier
development a possibility for the first time.
 PHP is forgiving: PHP language tries to be as forgiving as possible.
 PHP Syntax is C-Like.

Fig 1: Basic View of PHP

Characteristics of PHP

Five important characteristics make PHP's practical nature possible −

 Simplicity
 Efficiency
 Security
 Flexibility
 Familiarity

Hello World using PHP.

Just to give you a little excitement about PHP, I'm going to give you a small conventional
PHP Hello World program, You can try it using Demo link.
<html>
<head>
<title>Hello World</title>
</head>
<body>
<?php echo "Hello, World!";?>
</body> </html>

Applications of PHP

As mentioned before, PHP is one of the most widely used language over the web. I'm
going to list few of them here:

PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them. and can handle forms, i.e. gather data from files, save data to a file,
through email you can send data, return data to the user. You add, delete, modify elements within
your database through PHP and access cookies variables and set cookies. Using PHP, you can
restrict users to access some pages of your website and encrypt data.

Architecture Overview

This section explains how all the different parts of the driver fit together. From the
different language runtimes, through the extension and to the PHP libraries on top. This new
architecture has replaced the old mongo extension. We refer to the new one as
the mongodb extension.
Fig 2: Overview of PHP

At the top of this stack sits a pure » PHP library, which we will distribute as a Composer
package. This library will provide an API similar to what users have come to expect from the old
mongo driver (e.g. CRUD methods, database and collection objects, command helpers) and we
expect it to be a common dependency for most applications built with MongoDB. This library
will also implement common » specifications, in the interest of improving API consistency
across all of the » drivers maintained by MongoDB (and hopefully some community drivers,
too).Sitting below that library we have the lower level driver. This extension will effectively
form the glue between PHP and our system libraries. This extension will expose an identical
public API for the most essential and performance-sensitive functionality:

 Connection management
 BSON encoding and decoding
 Object document serialization (to support ODM libraries)
 Executing commands and write operations
 Handling queries and cursors

Prerequisites
Before proceeding with this tutorial you should have at least basic understanding of
computer programming, Internet, Database, and MySQL etc is very helpful.

PHP started out as a small open source project that evolved as more and more people
found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in
1994.

 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 e-commerce 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.

Common uses of PHP

 PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them.
 PHP can handle forms, i.e. gather data from files, save data to a file, through email you
can send data, return data to the user.
 You add, delete, modify elements within your database through PHP. Access cookies
variables and set cookies. Using PHP, you can restrict users to access some pages of your
website. It can encrypt data.

Characteristics of PHP

Five important characteristics make PHP's practical nature possible −

 Simplicity
 Efficiency
 Security
 Flexibility
 Familiarity

In order to develop and run PHP Web pages three vital components need to be installed
on your computer system.

 Web Server − PHP will work with virtually all Web Server software, including
Microsoft's Internet Information Server (IIS) but then most often used is freely available Apache
Server. Download Apache for free here − https://httpd.apache.org/download.cgi

 Database − PHP will work with virtually all database software, including Oracle and
Sybase but most commonly used is freely available MySQL database. Download MySQL for
free here − https://www.mysql.com/downloads/

 PHP Parser − In order to process PHP script instructions a parser must be installed to
generate HTML output that can be sent to the Web Browser. This tutorial will guide you how to
install PHP parser on your computer.

PHP Parser Installation

Before you proceed it is important to make sure that you have proper environment setup
on your machine to develop your web programs using PHP.

Type the following address into your browser's address box.

http://127.0.0.1/info.php

If this displays a page showing your PHP installation related information then it means
you have PHP and Webserver installed properly. Otherwise you have to follow given procedure
to install PHP on your computer.

This section will guide you to install and configure PHP over the following four
platforms −
 PHP Installation on Linux or Unix with Apache

 PHP Installation on Mac OS X with Apache

 PHP Installation on Windows NT/2000/XP with IIS

 PHP Installation on Windows NT/2000/XP with Apache

Apache Configuration

If you are using Apache as a Web Server then this section will guide you to edit Apache
Configuration Files.

Just Check it here − PHP Configuration in Apache Server

PHP.INI File Configuration

The PHP configuration file, php.ini, is the final and most immediate way to affect PHP's
functionality.

Just Check it here − PHP.INI File Configuration

Windows IIS Configuration

To configure IIS on your Windows machine you can refer your IIS Reference Manual
shipped along with IIS.

The main way to store information in the middle of a PHP program is by using a variable.

Here are the most important things to know about variables in PHP.

 All variables in PHP are denoted with a leading dollar sign ($).

 The value of a variable is the value of its most recent assignment.


 Variables are assigned with the = operator, with the variable on the left-hand side and the
expression to be evaluated on the right.

 Variables can, but do not need, to be declared before assignment.

 Variables in PHP do not have intrinsic types - a variable does not know in advance
whether it will be used to store a number or a string of characters.

 Variables used before they are assigned have default values.

 PHP does a good job of automatically converting types from one to another when
necessary.

 PHP variables are Perl-like.

PHP has a total of eight data types which we use to construct our variables −

 Integers − are whole numbers, without a decimal point, like 4195.

 Doubles − are floating-point numbers, like 3.14159 or 49.1.

 Booleans − have only two possible values either true or false.

 NULL − is a special type that only has one value: NULL.

 Strings − are sequences of characters, like 'PHP supports string operations.'

 Arrays − are named and indexed collections of other values.

 Objects − are instances of programmer-defined classes, which can package up both other
kinds of values and functions that are specific to the class.

 Resources − are special variables that hold references to resources external to PHP (such
as database connections).

Conclusion
FINAL THOUGHT: it's very important to learn an entire subject matter. As a
programmer-in-the-making, you may be inclined to take what you've learned and start coding
immediately, but before you've learned enough of the topic at large. In reality this will lead to
you coding away, and then eventually spending hours just to research how to solve one little
aspect you need. If you learned the whole subject matter of, say, procedural PHP, you most
likely will have naturally encountered that solution, and in a faction of the time! Often it can take
very many hours to research one small solution that results in one line of code.

Fig3 : Evolution of Various Scripts

Whereas learning that trick might have been a natural thing to learn as part of learning the
whole subject, and only requires 5 minutes of study in between learning many other tricks. In
other words, a developer that has to constantly seek out solutions to things he/she doesn't know
will waste a lot more time in aggregate than someone that mastered the subject as a whole, and
then went to apply it. You're just more relaxed and in a better learning mode when you're
focused on nothing but learning. But when you're focused on producing results, and have to learn
at the same time, it can be stressful and waste you tons of time going back and forth from testing
each of the tens of wrong solutions you're trying out and googling until you find the right one. 

MYSQL
MySQL is the most popular Open Source Relational SQL Database Management System.
MySQL is one of the best RDBMS being used for developing various web-based software
applications. MySQL is developed, marketed and supported by MySQL AB, which is a Swedish
company. This tutorial will give you a quick start to MySQL and make you comfortable with
MySQL programming.

Fig 4: Structure of Data Directory

MySQL Database

MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses.
MySQL is developed, marketed and supported by MySQL AB, which is a Swedish company.
MySQL is becoming so popular because of many good reasons −

 MySQL is released under an open-source license. So you have nothing to pay to use it.

 MySQL is a very powerful program in its own right. It handles a large subset of the
functionality of the most expensive and powerful database packages.

 MySQL uses a standard form of the well-known SQL data language.


 MySQL works on many operating systems and with many languages including PHP,
PERL, C, C++, JAVA, etc.

 MySQL works very quickly and works well even with large data sets.

 MySQL is very friendly to PHP, the most appreciated language for web development.

 MySQL supports large databases, up to 50 million rows or more in a table. The default
file size limit for a table is 4GB, but you can increase this (if your operating system can
handle it) to a theoretical limit of 8 million terabytes (TB).

 MySQL is customizable. The open-source GPL license allows programmers to modify


the MySQL software to fit their own specific environments.

MYSQL Functions

Here is the list of all important MySQL functions. Each function has been explained
along with suitable example.

 MySQL Group By Clause − The MySQL GROUP BY statement is used along with the
SQL aggregate functions like SUM to provide means of grouping the result dataset by
certain database table column(s).

 MySQL COUNT Function − The MySQL COUNT aggregate function is used to count
the number of rows in a database table.

 MySQL MAX Function − The MySQL MAX aggregate function allows us to select the
highest (maximum) value for a certain column.

 MySQL MIN Function − The MySQL MIN aggregate function allows us to select the
lowest (minimum) value for a certain column.

 MySQL SUM Function − The MySQL SUM aggregate function allows selecting the
total for a numeric column.

 MySQL CONCAT Function − This is used to concatenate any string inside any MySQL
command.
 MySQL DATE and Time Functions − Complete list of MySQL Date and Time related
functions.

 MySQL Numeric Functions − Complete list of MySQL functions required to manipulate


numbers in MySQL.

 MySQL String Functions − Complete list of MySQL functions required to manipulate


strings in MySQL.

Discussion

MySQL is the most popular Open Source Relational SQL Database Management System.
MySQL is one of the best RDBMS being used for developing various web-based software
applications. MySQL is developed, marketed and supported by MySQL AB, which is a Swedish
company. This tutorial will give you a quick start to MySQL and make you comfortable with
MySQL programming.

Angular JS - Overview

AngularJS is an open-source web application framework. It was originally developed in


2009 by Misko Hevery and Adam Abrons. It is now maintained by Google. Its latest version is
1.2.21.

AngularJS is a very powerful JavaScript Framework. It is used in Single Page


Application (SPA) projects. It extends HTML DOM with additional attributes and makes it
more responsive to user actions. AngularJS is open source, completely free, and used by
thousands of developers around the world. It is licensed under the Apache license version 2.0.

General Features

 AngularJS is a efficient framework that can create Rich Internet Applications (RIA).

 AngularJS provides developers an options to write client side applications using


JavaScript in a clean Model View Controller (MVC) way.

 Applications written in AngularJS are cross-browser compliant. AngularJS automatically


handles JavaScript code suitable for each browser.
 AngularJS is open source, completely free, and used by thousands of developers around
the world. It is licensed under the Apache license version 2.0.

Overall, AngularJS is a framework to build large scale, high-performance, and easyto-


maintain web applications.

Core Features

The core features of AngularJS are as follows −

 Data-binding − It is the automatic synchronization of data between model and view


components.

 Scope − These are objects that refer to the model. They act as a glue between controller
and view.

 Controller − These are JavaScript functions bound to a particular scope.

 Services − AngularJS comes with several built-in services such as $http to make a
XMLHttpRequests. These are singleton objects which are instantiated only once in app.

 Filters − These select a subset of items from an array and returns a new array.

 Directives − Directives are markers on DOM elements such as elements, attributes, css,
and more. These can be used to create custom HTML tags that serve as new, custom
widgets. AngularJS has built-in directives such as ngBind, ngModel, etc.

 Templates − These are the rendered view with information from the controller and
model. These can be a single file (such as index.html) or multiple views in one page
using partials.

 Routing − It is concept of switching views.

 Model View Whatever − MVW is a design pattern for dividing an application into
different parts called Model, View, and Controller, each with distinct responsibilities.
AngularJS does not implement MVC in the traditional sense, but rather something closer
to MVVM (Model-View-ViewModel). The Angular JS team refers it humorously as
Model View Whatever.
 Deep Linking − Deep linking allows to encode the state of application in the URL so
that it can be bookmarked. The application can then be restored from the URL to the
same state.

 Dependency Injection − AngularJS has a built-in dependency injection subsystem that


helps the developer to create, understand, and test the applications easily.

Fig 5: Overview - Angular JS

Advantages of AngularJS

The advantages of AngularJS are −

 It provides the capability to create Single Page Application in a very clean and
maintainable way.

 It provides data binding capability to HTML. Thus, it gives user a rich and responsive
experience.

 AngularJS code is unit testable.

 AngularJS uses dependency injection and make use of separation of concerns.

 AngularJS provides reusable components.

 With AngularJS, the developers can achieve more functionality with short code.

 In AngularJS, views are pure html pages, and controllers written in JavaScript do the
business processing.
On the top of everything, AngularJS applications can run on all major browsers and
smart phones, including Android and iOS based phones/tablets.

Disadvantages of AngularJS

Though AngularJS comes with a lot of merits, here are some points of concern −

 Not Secure − Being JavaScript only framework, application written in AngularJS are not
safe. Server side authentication and authorization is must to keep an application secure.

 Not degradable − If the user of your application disables JavaScript, then nothing would
be visible, except the basic page.

AngularJS Directives

The AngularJS framework can be divided into three major parts −

 ng-app − This directive defines and links an AngularJS application to HTML.

 ng-model − This directive binds the values of AngularJS application data to HTML
input controls.

 ng-bind − This directive binds the AngularJS application data to HTML tags.

Applications of AngularJS

The general features of AngularJS are as follows −

 AngularJS is a efficient framework that can create Rich Internet Applications (RIA).

 AngularJS provides developers an options to write client side applications using


JavaScript in a clean Model View Controller (MVC) way.

 Applications written in AngularJS are cross-browser compliant. AngularJS automatically


handles JavaScript code suitable for each browser.

 AngularJS is open source, completely free, and used by thousands of developers around
the world. It is licensed under the Apache license version 2.0.
WAMP Server

WAMP is an acronym that stands for Windows, Apache, MySQL, and PHP. It’s a
software stack which means installing WAMP installs Apache, MySQL, and PHP on your
operating system (Windows in the case of WAMP). Even though you can install them separately,
they are usually bundled up, and for a good reason too.

What’s good to know is that WAMP derives from LAMP (the L stands for Linux). The
only difference between these two is that WAMP is used for Windows, while LAMP – for Linux
based operating systems.

Let’s quickly go over what each letter represents “W” stands for Windows, there’s also
LAMP (for Linux) and MAMP (for Mac). “A” stands for Apache. Apache is the server software
that is responsible for serving web pages. When you request a page to be seen by you, Apache
grants your request over HTTP and shows you the site. “M” stands for MySQL. MySQL’s job is
to be the database management system for your server. It stores all of the relevant information
like your site’s content, user profiles, etc. “P” stands for PHP. It’s the programming language
that was used to write WordPress. It acts like glue for this whole software stack. PHP is running
in conjunction with Apache and communicating with MySQL.

Fig 6: WAMP Structure


Instead of installing and testing WordPress on your hosting account, you can do it on
your personal computer (localhost).

WAMP acts like a virtual server on your computer. It allows you to test all WordPress
features without any consequences since it’s localized on your machine and is not connected to
the web.

First of all, this means that you don’t need to wait until files are uploaded to your site,
and secondly – this makes creating backups much easier.WAMP speeds up the work process for
both developers and theme designers alike. What is more, you also get the benefit of playing
around with your site to your heart’s content. However, to actually make the website go live, you
need to get some form of hosting service and a Domain. See our beginner-friendly article
about web hosting for more information. In essence, WAMP is used as a safe space to work on
your website, without needing to actually host it online. WAMP also has a control panel.
Once you install the software package, all of the services mentioned above (excluding the
operating system that is) will be installed on your local machine. Whether you use WAMP or
software packages for the other operating systems, it’s a great way to save time. You won’t have
to upload files to a site and will be able to learn how to develop in a safe and care-free
environment.

DATA FLOW DIAGRAM

Level 1

Database
Admin Login
Level 1

Register
Database

User

Login

Level 2
Toll
Admin Location Details
Details

Payment

Report

Level 3
View Toll Details Select Location
User

Payment

Feedback

DESIGN SPECIFICATION
E-Toll Online Toll Plaza Booking System

User Admin

Login
Register & Login
Add Toll Details
View Toll Details

Receipt Verification
Payment

Reports & Feedback


Message Intimation

Queries & Feedback Send Message Intimation

Database

MODULES
Admin

 Admin Login
 Add Toll Details
 Payment

User

 User Register
 User Login
 Add vehicle Details
 Renewal Details
 Payment
 Feedback

MODULES DESCRIPTION
Admin
The admin can only login in this page. It checks whether the username and password are
correct, if correct allows the administrator to update or view the details else displays the error
message.

Login
This module is handling by administrator alone. Admin have a unique login and
password. After that admin have to login and then only he can access the entire website. The
admin has tie-up the multinational company.

Add Toll Details:


In this modules admin can be add the toll details login booking for driving in toll plaza.
View Payment
The mode of view payment may be through online or through cash on delivery
procedures.

User

Registration

In this module every user have to login into our website otherwise user have to register
their details into our website after complete registration user get a unique user id and password
after that only user can login in our website

Login

The login page is used for logging in the site authenticate person allows for existing user.
The user must first login to the site. After filling all the fields and the user can click the 'Submit'
button to sign in.

Add Vehicle details


In this module each and every user add the vehicle for driving in toll plaza.
Renewal details
This system has identified the user validity period, and renewal date store to toll plaza
management system. The toll plaza system is providing register and renewal application. User
can need to register/renewal with the application by submitting details of photo address proof
and required details and submit through online. Admin verify user details and satisfied details
approve application. User can read and apply any relevant vehicles information. So, Vehicle
related all details get in this system.

Payment

It is a web based application that can provide all the information related to toll plazas and
the passenger checks in either online or on a mobile device and pays the amount, then the
passenger will be provided a receipt.

Feedback:
The Customer can provide their feedback about the entire process whether it may be
positive or negative and the feedback.

IMPLEMENTATION
Implementation is the stage of the project when the theoretical design is turned out into a
working system. Thus it can be considered to be the most critical stage in achieving a successful
new system and in giving the user, confidence that the new system will work and be effective.

The implementation stage involves careful planning, investigation of the existing system
and it’s constraints on implementation, designing of methods to achieve changeover and
evaluation of changeover methods.

Create a domain from a hosting site www.00webhost.com

Save all programs that make up the web application in a folder named "E-Toll: Online Toll
Plaza Booking System" and place the folder in created domain's storage.

Log on to domain

TO RUN THE WEB APPLICATION

Open a web browser in any system connected to the internet to which the server is connected.

Log on to created domain.

The browser opens a web page containing the home page of the application wit which the user
can proceed.

VERIFICATION &TESTING

Testing Approach
A test case is an asset of data that the system will process as normal input. The strategies
that we have used in our project are,

SYSTEM TESTING
Testing is the stage of implementation of which aimed at ensuring that the system works
accurately and efficiently before live operation commences. Testing is vital to the success of the
system. System testing makes a logical assumption that if all the parts of the system are correct
the goal will be achieved. The candidates system subject to a variety of tests. Online response,
volume, stress, recovery, security and usability tests. A series of testing are performed for the
proposed system before the system is ready for user acceptance testing.

UNIT TESTING

The procedure level testing is made first. By giving improper inputs, the errors occurred
are noted and eliminated .Then the web form level is made.
INTEGRATION TESTING:

Testing is done for each module. After testing all the modules, the modules are integrated
and testing of the final system is done with the test data, specially designed to show that the
system will operate successfully in all its aspects conditions. Thus the system testing is a
confirmation that all its correct and an opportunity to show the user that the system works.

VALIDATION TESTING

Software Testing - Validation Testing. The process of evaluating software during the


development process or at the end of the development process to determine whether it satisfies
specified business requirements. Validation Testing ensures that the product actually meets the
client's needs.

REGRESSION TESTING

Regression Testing is defined as a type of software testing to confirm that a recent


program or code change has not adversely affected existing features. Regression Testing is
nothing but a full or partial selection of already executed test cases which are re-executed to
ensure existing functionalities work fine.

DATA/TABLE STRUCTURE

Table structure for table admin


Field Type Null Default
usernam varchar(30) Yes NULL
e
password varchar(30) Yes NULL

Dumping data for table admin

admin admin

Table structure for table payment

Field Type Null Default


id int(11) Yes NULL
uname varchar(30) Yes NULL
vno varchar(20) Yes NULL
vtype varchar(30) Yes NULL
source varchar(30) Yes NULL
destination varchar(30) Yes NULL
cardpay int(11) Yes NULL
bank varchar(30) Yes NULL
cardno varchar(20) Yes NULL
tway int(11) Yes NULL
payment int(11) Yes NULL
amount double Yes NULL
paid double Yes NULL
status int(11) Yes NULL
pay_count int(11) Yes NULL
secret varchar(20) Yes NULL
tdate varchar(15) Yes NULL

Dumping data for table payment

1 ra 4344 CAR Trichy Chennai 0 1 0 315 0 0 0 12-03-2013


m
2 ra 2323 BUS Trichy Chennai 0 1 0 455 0 0 0 12-03-2013
m
3 ra 2323 BUS Trichy Chennai 0 1 0 455 0 0 0 12-03-2013
m
4 ra 4344 CAR Trichy Chennai 0 1 0 315 0 0 0 25-03-2016
m
5 ra 4344 CAR Trichy Chennai 0 1 0 315 315 0 7 25-03-2016
m
6 mic 1111 BUS kochi thelugana 0 1 0 30 30 0 1 10-12-2019
n
7 mic 2222 4AXL Trichy Chennai 0 1 0 525 525 0 7 10-12-2019
E
8 mic 3333 BUS kochi thelugana 0 2 0 60 30 0 1 11-12-2019
n
9 mic 4444 3AXL Trichy Chennai 0 2 0 0 0 0 0 12-12-2019
E
10 mic 5555 4AXL kochi thelugana 0 1 0 40 40 0 1 10-12-2019
E n
11 mic 7777 BUS kochi thelugana 0 1 0 30 30 0 1 12-12-2019
n
12 mic 1111 BUS 0 1 0 0 0 0 0 Car
13 mic 2222 4AXL Trichy Chennai 0 1 0 525 465 0 6 25-12-2019
E

Table structure for table register

Field Type Null Default


id int(11) Yes NULL
name varchar(30) Yes NULL
address varchar(50) Yes NULL
contact bigint(20) Yes NULL
email varchar(30) Yes NULL
bank varchar(30) Yes NULL
cardno varchar(30) Yes NULL
payment int(11) Yes NULL
driving varchar(30) Yes NULL
vehicle varchar(30) Yes NULL
proof varchar(50) Yes NULL
utype int(11) Yes NULL
uname varchar(30) Yes NULL
pass varchar(30) Yes NULL
rdate varchar(15) Yes NULL
status int(11) Yes NULL

Dumping data for table register

1 Ra Tri 96385 ram@g L 45212 1 D1dri.j V1car.jpg P1idpro.j 0 Ra 123 0


m ch 27415 mail.co V 45452 pg pg m 456
y m B
2 Am tyh 90123 gopi@g io 23443 1 D2pars V21_202 P2U7P09 0 Ad 123 0
ru tyn 44321 mail.co b 543 vnath- 639_1.jpg voM.jpeg mi 4
m exotic n
a-fl-
8.jpg
3 mi vc 90123 sir@gma io 345 1 0 Raj 123 0
nio b 44321 il.com b a 4
n fgg
b
gf
4 mi tric 90123 gopi@g io 345 1 0 Mi min 0
nio hy 44321 mail.co b c i
n m

Table structure for table toll_details

Field Type Null Default


id int(11) Yes NULL
state varchar(30) Yes NULL
source varchar(30) Yes NULL
destination varchar(30) Yes NULL
tname varchar(30) Yes NULL
vtype varchar(30) Yes NULL
distance double Yes NULL
amount double Yes NULL
amount2 int(11) Yes NULL

Dumping data for table toll_details

1 Tamilnadu Trichy Chennai Samayapuram car 10 40 0


2 Tamilnadu Trichy Chennai Thirumandurai car 75 50 0
3 Tamilnadu Trichy Chennai Sengurichi car 120 50 0
4 Tamilnadu Trichy Chennai Vikravandi car 165 75 0
5 Tamilnadu Trichy Chennai Athur car 205 35 0
6 Tamilnadu Trichy Chennai Paranur car 270 35 0
7 Tamilnadu Trichy Chennai Vanagaram car 300 30 0
8 kerala kochin thelugana Kadhakali 17 10 20

Table structure for table toll_state

Field Type Null Default


id int(11) Yes NULL
state varchar(30) Yes NULL
nhno varchar(30) Yes NULL
tname varchar(30) Yes NULL
location varchar(30) Yes NULL
section varchar(50) Yes NULL

Dumping data for table toll_state

1 Tamil 5 Nallur Km 21.625 Chennai - Tada


Nadu
2 Tamil 45 Surapattu Km 28.600 Chennai Bypass
Nadu
3 Tamil 45 Vanagaram Km 16.500 Chennai Bypass
Nadu
4 Tamil 7 Kodai Road Km 398.500 Dindigul bypass - Samyanallore
Nadu

Table structure for table vehicle_det

Field Type Null Default


id int(11) Yes NULL
unam varchar(30) Yes NULL
e
vno varchar(20) Yes NULL
vtype varchar(30) Yes NULL Dumping data for table vehicle_det
vname varchar(30) Yes NULL
1 ram 4344 CAR aaa
2 ram 2323 BUS bbb
3 mic 1111 BUS bus
4 mic 2222 4AXLE lorry
5 mic 3333 BUS truck
6 mic 4444 3AXLE car
7 mic 5555 4AXLE lorry
8 mic 7777 BUS truck
9 mic 8888 4AXLE lorry
10 mic 123 BUS bus
11 mic 234 BUS truck
12 mic 2345 CAR Car

Table structure for table vehicle_type

Field Type Null Default


id int(11) Yes NULL
vtyp varchar(30) Yes NULL
e
vcost double Yes NULL

Dumping data for table vehicle_type

1 mini 500
2 power 1000
LAYOUT
Index.php

<?php

session_start();

include("dbconnect.php");

extract($_POST);

$msg="";
if(isset($btn))

if($uname=="admin")

$qry=mysql_query("select * from admin where username='".$uname."' &&


password='".$pass."'");

$num=mysql_num_rows($qry);

if($num==1)

$_SESSION['uname']=$uname;

header("location:admin.php");

else

$msg="Invalid User!";

else

$qry=mysql_query("select * from register where uname='".$uname."' && pass='".


$pass."'");

$num=mysql_num_rows($qry);

if($num==1)

$_SESSION['uname']=$uname;
header("location:user.php");

else

$msg="Invalid User!";

?>

<html>

<title><?php include("title.php"); ?></title>

</head>

<body>

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

<h1 align="center">Online E-Toll Plaza</h1>

<p align="center"> <a


href="index.php">Home</a>&nbsp;&nbsp;&nbsp;<a href="register.php">New User</a></p>

<table width="227" height="220" border="0" align="center"


cellpadding="5" cellspacing="0">
<tr>

<td width="80" scope="col">&nbsp;</td>

<td width="80" scope="col">Username</td>

</tr>

<tr>

<td>&nbsp;</td>

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

</tr>

<tr>

<td>&nbsp;</td>

<td>Password </td>

</tr>

<tr>

<td>&nbsp;</td>

<td><input type="password" name="pass" /></td>

</tr>

<tr>

<td>&nbsp;</td>

<td><input type="submit" name="btn" value="Login" onClick="return validate()"


/></td>

</tr>

</table>

</form>

</body></html>

Register.php
<?php

session_start();

include("dbconnect.php");

extract($_POST);

$msg="";

if(isset($btn))

$mq=mysql_query("select max(id) as maxid from register");

$mr=mysql_fetch_array($mq);

$id=$mr['maxid']+1;

$qq=mysql_query("insert into
register(id,name,address,contact,email,bank,cardno,payment,driving,vehicle,proof,uname,pass,rdate,st
atus) values(".$id.",'".$name."','".$address."','".$contact."','".$email."','".$bank."','".$cardno."','".
$payment."','','','','".$uname."','".$pass."','".$cdate."','0')");
if($qq)

?>

<script language="javascript">

alert("Registered Successfully");

window.location.href="index.php";

</script>

<?php

?>

<html>

<title></title>

</head>

<body>

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

<h1 align="center">E-Toll Plaza</h1>

<p align="center"> <a href="index.php">Home</a>&nbsp;&nbsp;&nbsp;<a


href="register.php">New User</a></p>

<h2 align="center">New User Registration </h2>

<table width="470" height="391" border="0" align="center" cellpadding="5"


cellspacing="0">
<tr>

<td width="202">Name</td>

<td width="202"><input type="text" name="name" /></td>

</tr>

<tr>

<td>Address</td>

<td><textarea name="address"></textarea></td>

</tr>

<tr>

<td>Contact No. </td>

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

</tr>

<tr>

<td>E-mail</td>

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

</tr>

<tr>

<td>Bank</td>

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

</tr>

<tr>

<td>Credit Card No. </td>

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

</tr>

<tr>
<td>Payment</td>

<td><input name="payment" type="radio" value="1" />

Postpaid

<input name="payment" type="radio" value="2" />

Prepaid </td>

</tr>

<tr>

<td>Username</td>

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

</tr>

<tr>

<td>Password</td>

<td><input type="password" name="pass" /></td>

</tr>

<tr>

<td>&nbsp;</td>

<td><input type="submit" name="btn" value="Submit" /></td>

</tr>

</table>

</div>

</form>

</body></html>

User.php
<?php

session_start();

include("dbconnect.php");

extract($_POST);

$msg="";

$id=$_REQUEST['id'];

$uname=$_SESSION['uname'];

$qs=mysql_query("select * from register where uname='".$uname."'");

$rs=mysql_fetch_array($qs);

?>

<html>

<title>Toll Plaza</title>

</head>

<body>
<h1 align="center">Online Toll Plaza</h1>

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

<p align="center"> <a href="user.php">Home</a> |

<a href="view_toll2.php">Toll Plaza</a> | <a


href="user_info.php">User Info</a> | <a href="register2.php">Vehicle Info</a> |

<a href="logout.php">Logout</a></p>

<p align="center">&nbsp;</p>

<h2 align="center">Welcome <?php echo $uname; ?></h2>

<p align="center">&nbsp;</p>

<table width="404" height="294" border="0" align="center" cellpadding="5"


cellspacing="0">

<tr>

<th colspan="2" align="center" scope="col">User Information </th>

</tr>

<tr>

<td width="150" class="txt1">Name</td>

<td width="163" class="txt1">: <?php echo $rs['name']; ?></td>

</tr>

<tr>

<td class="txt1">Address</td>

<td class="txt1">: <?php echo $rs['address']; ?></td>

</tr>

<tr>

<td class="txt1">Contact</td>

<td class="txt1">: <?php echo $rs['contact']; ?></td>


</tr>

<tr>

<td class="txt1">E-mail</td>

<td class="txt1">: <?php echo $rs['email']; ?></td>

</tr>

<tr>

<td class="txt1">Bank</td>

<td class="txt1">: <?php echo $rs['bank']; ?></td>

</tr>

<tr>

<td class="txt1">Card No. </td>

<td class="txt1">: <?php echo $rs['cardno']; ?></td>

</tr>

<tr>

<td class="txt1">Payment Mode </td>

<td class="txt1">: <?php

if($rs['payment']=="1")

echo "Postpaid";

else

echo "Prepaid";

}
?></td>

</tr>

</table>

<p align="center">&nbsp;</p>

<h3 align="center">Vehicle Details </h3>

<table width="459" border="1" align="center" cellpadding="5" cellspacing="0">

<tr>

<th width="32" scope="col">Sno</th>

<th width="117" scope="col">Vehicle No. </th>

<th width="132" scope="col">Vehicle Type </th>

<th width="128" scope="col">Vehicle Name </th>

<th width="128" scope="col">Toll Booking </th>

</tr>

<?php

$i=0;

$qs2=mysql_query("select * from vehicle_det where uname='".$uname."'");

while($rs2=mysql_fetch_array($qs2))

$i++;

?>

<tr>

<td><?php echo $i; ?></td>

<td><?php echo $rs2['vno']; ?></td>

<td><?php echo $rs2['vtype']; ?></td>


<td><?php echo $rs2['vname']; ?></td>

<td><a href="user_pay.php?vno=<?php echo $rs2['vno']; ?>&vtype=<?php echo $rs2['vtype']; ?


>">Booking</a></td>

</tr>

<?php

?>

</table>

</form>

</body></html>

User_pay.php

<?php

include("include/protect.php");

include("include/dbconnect.php");
extract($_POST);

$uname=$_SESSION['uname'];

$vno=$_REQUEST['vno'];

$vtype=$_REQUEST['vtype'];

if(isset($btn))

$mq=mysql_query("select max(id) as maxid from payment");

$mr=mysql_fetch_array($mq);

$id=$mr['maxid']+1;

$q2=mysql_query("select * from toll_details where source='$source' &&


destination='$destination'");

while($r2=mysql_fetch_array($q2))

if($vtype=="CAR")

$am=$r2['amount'];

else if($vtype=="BUS")

$am=$r2['amount']+20;

else if($vtype=="4AXLE")

$am=$r2['amount']+30;

}
$amt+=$am;

if($tway==1)

$amount=$amt;

else

$amount=$amt*2;

$ins=mysql_query("insert into payment(id,uname,vno,vtype,source,destination,tway,amount,tdate)


values($id,'$uname','$vno','$vtype','$source','$destination','$tway','$amount','$tdate')");

header("location:bill.php?id=$id");

?>

<html>

<head>

<title>Toll Plaza</title>

</head>

<body>

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

<a href="user.php">Home</a> | <a href="view_toll2.php">Toll Plaza</a> | <a


href="logout.php">Logout</a>

<h2 align="center">Toll Booking</h2>


<table width="351" height="241" border="0" align="center" cellpadding="5"
cellspacing="0">

<tr>

<th align="left" scope="row">Source</th>

<td align="left"><select name="source" onChange="this.form.submit()">

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

<?php

$sq=mysql_query("select distinct(source) from toll_details");

while($sr=mysql_fetch_array($sq))

?>

<option <?php if($sr['source']==$source) echo "selected"; ?>><?php echo


$sr['source']; ?></option>

<?php

?>

</select> </td>

</tr>

<tr>

<th align="left" scope="row">Destination</th>

<td align="left"><select name="destination">

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

<?php

$dq=mysql_query("select distinct(destination) from toll_details where


source='$source'");

while($dr=mysql_fetch_array($dq))
{

?>

<option><?php echo $dr['destination']; ?></option>

<?php

?>

</select> </td>

</tr>

<tr>

<th align="left" scope="row">Way</th>

<td align="left"><input name="tway" type="radio" value="1" />

One way <input name="tway" type="radio" value="2" />

Up and Down </td>

</tr>

<tr>

<th align="left" scope="row">Travel Date </th>

<td align="left"><input type="text" name="tdate" /></td>

</tr>

<tr>

<th align="left" scope="row">&nbsp;</th>

<td align="left"><input type="submit" name="btn" value="Submit" /></td>

</tr>

</table>

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

Bill.php

<?php

include("include/protect.php");

include("include/dbconnect.php");

extract($_POST);

$uname=$_SESSION['uname'];

?>

<html>

<head>

<title>Toll Plaza</title>

</head>

<body>
<form action="" method="post" name="form1">

<a href="user.php">Home</a> | <a href="view_toll2.php">Toll Plaza</a> | <a


href="logout.php">Logout</a>

<h2 align="center">Bill</h2>

<?php

$id=$_REQUEST['id'];

$qry=mysql_query("select * from payment where id=$id");

$row=mysql_fetch_array($qry);

$bill=str_pad($id,4,"0",STR_PAD_LEFT);

?>

<table width="712" height="150" border="0" align="center" cellpadding="10"


cellspacing="0" class="bor1">

<tr>

<th width="107" align="right" scope="row">Bill No.</th>

<td width="187" align="left">: <?php echo $bill; ?></td>

<td width="152" align="right"><strong>Date</strong></td>

<td width="208" align="left">: <?php echo $row['tdate']; ?></td>

</tr>

<tr>

<th align="right" scope="row">Custmer ID </th>

<td align="left">: <?php echo $row['uname']; ?></td>

<td align="right"><strong>Amount</strong></td>

<td align="left">: Rs. <?php echo $row['paid']; ?></td>


</tr>

<tr>

<th align="right" scope="row">Vehicle No. </th>

<td align="left">: <?php echo $row['vno']; ?></td>

<td align="right"><strong>Vehicle Type </strong></td>

<td align="left">: <?php echo $row['vtype']; ?></td>

</tr>

<tr>

<th align="right" scope="row">Source</th>

<td align="left">: <?php echo $row['source']; ?></td>

<td align="right"><strong>Destination</strong></td>

<td align="left">: <?php echo $row['destination']; ?></td>

</tr>

</table>

<p align="center">

<input type="submit" name="Submit" value="Reload" />

</p>

<p align="center"><a href="webview.php?src=<?php echo $row['source']; ?>&dest=<?


php echo $row['destination']; ?>&pid=<?php echo $row['id']; ?>" target="_blank">Web View</a>

<a href="print.php?id=<?php echo $id; ?>" target="_blank">Print</a> </p>

</form>

</body></html>

Print.php
<?php

include("include/protect.php");

include("include/dbconnect.php");

extract($_POST);

$uname=$_SESSION['uname'];

?>

<style type="text/css">

.bor1 {

border: 1px solid #666666;

</style>

<p>&nbsp;</p>

<h2 align="center">Bill</h2>
<p align="center">&nbsp;</p>

<?php

$id=$_REQUEST['id'];

$qry=mysql_query("select * from payment where id=$id");

$row=mysql_fetch_array($qry);

$bill=str_pad($id,4,"0",STR_PAD_LEFT);

?>

<table width="712" height="150" border="0" align="center" cellpadding="10"


cellspacing="0" class="bor1">

<tr>

<th width="107" align="right" scope="row">Bill No.</th>

<td width="187" align="left">: <?php echo $bill; ?></td>

<td width="152" align="right"><strong>Date</strong></td>

<td width="208" align="left">: <?php echo $row['tdate']; ?></td>

</tr>

<tr>

<th align="right" scope="row">Custmer ID </th>

<td align="left">: <?php echo $row['uname']; ?></td>

<td align="right"><strong>Amount</strong></td>

<td align="left">: Rs. <?php echo $row['amount']; ?></td>

</tr>

<tr>

<th align="right" scope="row">Vehicle No. </th>

<td align="left">: <?php echo $row['vno']; ?></td>

<td align="right"><strong>Vehicle Type </strong></td>

<td align="left">: <?php echo $row['vtype']; ?></td>


</tr>

<tr>

<th align="right" scope="row">Source</th>

<td align="left">: <?php echo $row['source']; ?></td>

<td align="right"><strong>Destination</strong></td>

<td align="left">: <?php echo $row['destination']; ?></td>

</tr>

</table>

<p align="center">&nbsp;</p>

View_toll.php

<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

?>
<html>

<title><?php include("include/title.php"); ?></title>

</head>

<body>

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

<a href="admin.php">Home</a> |

<a href="view_toll.php">TollPlaza</a> | <a href="logout.php">Logout</a>

<h2 align="center">Toll Details </h2>

<p>&nbsp;</p>

<div align="center">

<table width="637" height="70" border="1" align="center" cellpadding="5"


cellspacing="0">

<tr>

<th scope="col">Sno</th>

<th scope="col">State</th>

<th scope="col">Source</th>

<th scope="col">Destination </th>

<th scope="col">Toll Plaza Name </th>

<th scope="col">Location</th>

<th scope="col">Amount</th>

</tr>

<?php

$i=0;

$qs=mysql_query("select * from toll_details");


while($rs=mysql_fetch_array($qs))

{ $i++;

?>

<tr>

<td><?php echo $i; ?></td>

<td><?php echo $rs['state']; ?></td>

<td><?php echo $rs['source']; ?></td>

<td><?php echo $rs['destination']; ?></td>

<td><?php echo $rs['tname']; ?></td>

<td><?php echo $rs['distance']; ?> Km</td>

<td><?php echo $rs['amount']; ?></td>

</tr>

<?php

?>

</table>

<a href="vtype.php">Vehicle</a> |

<a href="add_toll.php">Add Toll Plaza</a>

</form>

</body></html>

User_info.php
<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";

$id=$_REQUEST['id'];

$uname=$_SESSION['uname'];

$qs=mysql_query("select * from register where uname='".$uname."'");

$rs=mysql_fetch_array($qs);

?>

<html>

<title>Toll Plaza</title>

</head>

<body>
<form action="" method="post" name="form1">

<a href="user.php">Home</a> |

<a href="view_toll2.php">Toll Plaza</a> |

<a href="user_info.php">User Info</a> |

<a href="register2.php">Vehicle Info</a> |

<a href="logout.php">Logout</a>

<h2 align="center">Welcome <?php echo $uname; ?></h2>

<p align="center">&nbsp;</p>

<table width="404" height="294" border="0" align="center" cellpadding="5"


cellspacing="0">

<tr>

<th colspan="2" align="center" scope="col">User Information </th>

</tr>

<tr>

<td width="150" class="txt1">Name</td>

<td width="163" class="txt1">: <?php echo $rs['name']; ?></td>

</tr>

<tr>

<td class="txt1">Address</td>

<td class="txt1">: <?php echo $rs['address']; ?></td>

</tr>

<tr>

<td class="txt1">Contact</td>

<td class="txt1">: <?php echo $rs['contact']; ?></td>

</tr>
<tr>

<td class="txt1">E-mail</td>

<td class="txt1">: <?php echo $rs['email']; ?></td>

</tr>

<tr>

<td class="txt1">Bank</td>

<td class="txt1">: <?php echo $rs['bank']; ?></td>

</tr>

<tr>

<td class="txt1">Card No. </td>

<td class="txt1">: <?php echo $rs['cardno']; ?></td>

</tr>

<tr>

<td class="txt1">Payment Mode </td>

<td class="txt1">: <?php

if($rs['payment']=="1")

echo "Postpaid";

else

echo "Prepaid";

}
?></td>

</tr>

</table>

<p align="center">&nbsp;</p>

<h3 align="center">Vehicle Details </h3>

<table width="459" border="1" align="center" cellpadding="5" cellspacing="0">

<tr>

<th width="32" scope="col">Sno</th>

<th width="117" scope="col">Vehicle No. </th>

<th width="132" scope="col">Vehicle Type </th>

<th width="128" scope="col">Vehicle Name </th>

</tr>

<?php

$i=0;

$qs2=mysql_query("select * from vehicle_det where uname='".$uname."'");

while($rs2=mysql_fetch_array($qs2))

$i++;

?>

<tr>

<td><?php echo $i; ?></td>

<td><?php echo $rs2['vno']; ?></td>

<td><?php echo $rs2['vtype']; ?></td>

<td><?php echo $rs2['vname']; ?></td>

</tr>
<?php

?>

</table>

</form>

</body></html>

Redister2.php

<?php

session_start();

include("dbconnect.php");

extract($_POST);

$msg="";
$uname=$_SESSION['uname'];

$qs2=mysql_query("select * from register where uname='$uname'");

$rs2=mysql_fetch_array($qs2);

$id=$rs2['id'];

if(isset($btn2))

$vno=$_POST['vno'];

$vname=$_POST['vname'];

$vtype=$_POST['vtype'];

for($j=0;$j<count($vno);$j++)

$mq = mysql_query("select max(id) as maxid from vehicle_det");

$mr = mysql_fetch_array($mq);

$id = $mr['maxid']+1;

mysql_query("insert into vehicle_det(id,uname,vno,vtype,vname) values(".


$id.",'".$uname."','".$vno[$j]."','".$vtype[$j]."','".$vname[$j]."')");

header("location:user.php");

?>

<html>

<title><?php include("title.php"); ?></title>

</head>

<body>
<form action="" method="post" name="form1">

<p align="center"><a href="user.php">Home</a>&nbsp;&nbsp;&nbsp;

<a href="view_toll2.php">Toll Plaza</a>&nbsp;&nbsp;&nbsp;

<a href="logout.php">Logout</a></p>

<h2 align="center">Vehicle Information </h2>

<table width="438" height="93" border="0" align="center" cellpadding="5"


cellspacing="0">

<tr>

<td width="202" height="36">Number of Vehicles </td>

<td width="202"><input type="text" name="num" /></td>

</tr>

<tr>

<td height="24">&nbsp;</td>

<td><input type="submit" name="btn" value="Submit" /></td>

</tr>

</table>

<?php

if(isset($btn))

?>

<p>&nbsp;</p>

<table width="490" height="82" align="center" cellpadding="0" cellspacing="0">

<tr>
<th scope="col">Vehicle No. </th>

<th scope="col">Type</th>

<th scope="col">Vehicle Name </th>

</tr>

<?php

for($i=1;$i<=$num;$i++)

?>

<tr>

<td><input name="vno[]" type="text" size="15" /></td>

<td><select name="vtype[]">

<option value="CAR">Car/Jeep/Van</option>

<option value="BUS">Bus/Truck</option>

<option value="3AXLE">Upto 3 Axle</option>

<option value="4AXLE">4 to Above(Lorry)</option>

</select>

</td>

<td><input type="text" name="vname[]" /></td>

</tr>

<?php

?>

</table>

<p align="center">

<input type="submit" name="btn2" value="Submit" />


</p>

<?php

?>

</form>

</body></html>

Admin.php

<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";
?>

<html >

<title><?php include("include/title.php"); ?></title>

</head>

<body>

<h1 align="center">Online Toll Plaza</h1>

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

<a href="admin.php">Home</a> |

<a href="view_toll.php">Toll Plaza</a> |

<a href="logout.php">Logout</a>

<h2 align="center">User Information </h2>

<div align="center">

<table width="546" height="85" border="1" align="center" cellpadding="5"


cellspacing="0">

<tr>

<th scope="col">Sno</th>

<th scope="col">Name</th>
<th scope="col">Contact No. </th>

<th scope="col">E-mail</th>

<th scope="col">Address</th>

<th scope="col">Vehicle Detials </th>

</tr>

<?php

$i=0;

$qs=mysql_query("select * from register");

while($rs=mysql_fetch_array($qs))

$i++;

?>

<tr>

<td><?php echo $i; ?></td>

<td><?php echo $rs['name']; ?></td>

<td><?php echo $rs['contact']; ?></td>

<td><?php echo $rs['email']; ?></td>

<td><?php echo $rs['address']; ?></td>

<td><a href="admin_view.php?user=<?php echo $rs['uname']; ?>">Click</a></td>

</tr>

<?php

?>

</table>

</div>
<div class="foot">

<a href="vtype.php">Vehicle</a> |

<a href="add_toll.php">Add Toll Plaza</a>

</div>

</div>

</div>

</form>

</body></html>

Vtype.php

<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";
if(isset($btn))

for($i=0;$i<count($vid);$i++)

mysql_query("update vehicle_type set vtype='$vtype[$i]',vcost='$vcost[$i]' where id=$vid[$i]");

header("location:vtype.php");

?>

<html>

<title><?php include("include/title.php"); ?></title>

</head>

<body>

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

<a href="admin.php">Home</a> | <a href="vtype.php">Vehicle</a> | <a


href="view_toll.php">Toll Plaza</a> |

<a href="logout.php">Logout</a>

<h2 align="center">Vehicle Information </h2>

<div align="center">

<table width="546" height="85" border="1" align="center" cellpadding="5"


cellspacing="0">
<tr>

<th scope="col">Sno</th>

<th scope="col">Vehicle</th>

<th scope="col">Cost</th>

</tr>

<?php

$i=0;

$qs=mysql_query("select * from vehicle_type");

while($rs=mysql_fetch_array($qs))

$i++;

?>

<tr>

<td><?php echo $i; ?></td>

<td><input type="text" name="vtype[]" value="<?php echo $rs['vtype']; ?>" /></td>

<td><input type="text" name="vcost[]" value="<?php echo $rs['vcost']; ?>" />

<input type="hidden" name="vid[]" value="<?php echo $rs['id']; ?>"


/></td>

</tr>

<?php

?>

</table>

<p>

<input type="submit" name="btn" value="Submit" />


</p>

<a href="add_toll.php">Add New Toll Plaza Details</a>

</form>

</body></html>

Add_toll.php

<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";

if(isset($btn))
{

$mq=mysql_query("select max(id) as maxid from toll_details");

$mr=mysql_fetch_array($mq);

$id=$mr['maxid']+1;

$qq=mysql_query("insert into toll_details(id,state,source,destination,tname,distance,amount,amount2)


values($id,'$state','$source','$destination','$tname','$distance','$amount','$amount2')");

if($qq)

?>

<script language="javascript">

alert("Added Successfully");

window.location.href="view_toll.php";

</script>

<?php

?>

<html>

<title><?php include("include/title.php"); ?></title>

</head>
<body>

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

<a href="admin.php">Home</a> | <a href="view_toll.php">Toll Plaza</a>

<h2 align="center">Toll Plaza Details </h2>

<p>&nbsp;</p>

<div align="center">

<table width="356" height="252" border="0" cellpadding="5" cellspacing="0">

<tr>

<th width="150" align="left" scope="row">State</th>

<td width="146" align="left"><input type="text" name="state" /></td>

</tr>

<tr>

<th align="left" scope="row">Source</th>

<td align="left"><input type="text" name="source" /></td>

</tr>

<tr>

<th align="left" scope="row">Destination </th>

<td align="left"><input type="text" name="destination" /></td>

</tr>

<tr>

<th align="left" scope="row">Toll Name </th>

<td align="left"><input type="text" name="tname" /></td>

</tr>

<tr>
<th align="left" scope="row">Distance </th>

<td align="left"><input type="text" name="distance" /></td>

</tr>

<tr>

<th align="left" scope="row">Single way Amount </th>

<td align="left"><input type="text" name="amount" /></td>

</tr>

<tr>

<th align="left" scope="row">Double way Amount </th>

<td align="left"><input type="text" name="amount2"></td>

</tr>

<tr>

<th align="left" scope="row">&nbsp;</th>

<td align="left"><input type="submit" name="btn" value="Submit" /></td>

</tr>

</table>

</div>

<a href="add_toll.php">Add New Toll Plaza Details</a>

</form>

</body></html>

Admin_view.php
<?php

session_start();

include("include/dbconnect.php");

extract($_POST);

$msg="";

$id=$_REQUEST['id'];

$user=$_REQUEST['user'];

$qs=mysql_query("select * from register where uname='".$user."'");

$rs=mysql_fetch_array($qs);

?>

<html>

<title>Toll Plaza</title>

</head>

<body>
<h1 align="center">Online Toll Plaza</h1>

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

<a href="admin.php">Home</a> |

<a href="view_toll.php">Toll Plaza</a> |

<a href="logout.php">Logout</a>

<h2 align="center">Welcome <?php echo $uname; ?></h2>

<p align="center">&nbsp;</p>

<table width="404" height="294" border="0" align="center" cellpadding="5"


cellspacing="0">

<tr>

<th colspan="2" align="center" scope="col">User Information </th>

</tr>

<tr>

<td width="150" class="txt1">Name</td>

<td width="163" class="txt1">: <?php echo $rs['name']; ?></td>

</tr>

<tr>

<td class="txt1">Address</td>

<td class="txt1">: <?php echo $rs['address']; ?></td>

</tr>

<tr>

<td class="txt1">Contact</td>

<td class="txt1">: <?php echo $rs['contact']; ?></td>

</tr>

<tr>

<td class="txt1">E-mail</td>
<td class="txt1">: <?php echo $rs['email']; ?></td>

</tr>

<tr>

<td class="txt1">Bank</td>

<td class="txt1">: <?php echo $rs['bank']; ?></td>

</tr>

<tr>

<td class="txt1">Card No. </td>

<td class="txt1">: <?php echo $rs['cardno']; ?></td>

</tr>

<tr>

<td class="txt1">Payment Mode </td>

<td class="txt1">: <?php

if($rs['payment']=="1")

echo "Postpaid";

else

echo "Prepaid";

?></td>

</tr>
</table>

<p align="center">&nbsp;</p>

<h3 align="center">Vehicle Details </h3>

<table width="459" border="1" align="center" cellpadding="5" cellspacing="0">

<tr>

<th width="32" scope="col">Sno</th>

<th width="117" scope="col">Vehicle No. </th>

<th width="132" scope="col">Vehicle Type </th>

<th width="128" scope="col">Vehicle Name </th>

</tr>

<?php

$i=0;

$qs2=mysql_query("select * from vehicle_det where uname='".$uname."'");

while($rs2=mysql_fetch_array($qs2))

$i++;

?>

<tr>

<td><?php echo $i; ?></td>

<td><?php echo $rs2['vno']; ?></td>

<td><?php echo $rs2['vtype']; ?></td>

<td><?php echo $rs2['vname']; ?></td>

</tr>

<?php

}
?>

</table>

</form>

</body></html>

Webview.php

<?php

include("include/protect.php");

include("include/dbconnect.php");

extract($_POST);

$uname=$_SESSION['uname'];

$pid=$_REQUEST['pid'];

$src=$_REQUEST['src'];

$dest=$_REQUEST['dest'];
$q2=mysql_query("select * from payment where id=$pid");

$r2=mysql_fetch_array($q2);

if($_REQUEST['act']=="ok")

$tid=$_REQUEST['tid'];

$q3=mysql_query("select * from toll_details where id=$tid");

$r3=mysql_fetch_array($q3);

$vtype=$r2['vtype'];

if($vtype=="CAR")

$am=$r3['amount'];

else if($vtype=="BUS")

$am=$r3['amount']+20;

else if($vtype=="4AXLE")

$am=$r3['amount']+30;

mysql_query("update payment set paid=paid+$am,pay_count=pay_count+1 where id=$pid");

header("location:webview.php?pid=$pid&src=$src&dest=$dest");
}

?>

<html>

<head>

<title>Toll Plaza</title>

</head>

<body>

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

<p>&nbsp;</p>

<h3 align="center">Toll Payment </h3>

<table width="637" height="70" border="1" align="center" cellpadding="5" cellspacing="0">

<tr>

<th scope="col">Sno</th>

<th scope="col">State</th>

<th scope="col">Source</th>

<th scope="col">Destination </th>

<th scope="col">Toll Plaza Name </th>

<th scope="col">Location</th>

<th scope="col">Amount</th>

<th scope="col">Payment</th>

</tr>

<?php

$i=0;

$qs=mysql_query("select * from toll_details where source='$src' &&


destination='$dest'");

while($rs=mysql_fetch_array($qs))
{ $i++;

?>

<tr>

<td><?php echo $i; ?></td>

<td><?php echo $rs['state']; ?></td>

<td><?php echo $rs['source']; ?></td>

<td><?php echo $rs['destination']; ?></td>

<td><?php echo $rs['tname']; ?></td>

<td><?php echo $rs['distance']; ?> Km</td>

<td><?php echo $rs['amount']; ?></td>

<td>

<?php

if($r2['pay_count']<$i)

?>

<a href="webview.php?act=ok&tid=<?php echo $rs['id']; ?>&pid=<?php echo $pid; ?>&src=<?


php echo $src; ?>&dest=<?php echo $dest; ?>">Payment</a>

<?php

else

echo "Paid";

?>

</td>
</tr>

<?php

?>

</table>

<a href="bill.php">Back</a>

</form>

</body></html>

Dbconnect.php

<?php

$connect=mysql_connect("localhost","root","");

mysql_select_db("toll_plaza",$connect);

?>

Logout.php

<?php

session_start();

session_destroy();

header("location:index.php");

?>

Title.php

<?php

echo "Online E-Toll Plaza";

?>
CONCLUSION

The traffic conjunction and that need of future generation, save energy and time.
Our project mainly impact full in these aspects, by saving the time on the toll, and also for to
save fuel and by regulating the pollution and usage of vehicle at toll gates; as shown it makes the
toll collection payment easy by using automatic toll cash collection process. By the realization of
the above proposed system we can make the Toll Tax collection system more efficient and can
reduce the traffic logging on the highways. This system will save a lot of precious time of the
driver, passengers as well as of the tax collection authorities.
BIBLIOGRAPHY

[1] Sangeeta Pandey, Yamuna Rai and Shipra Mishra, “Fully Automated Toll Tax Collection
Using RF Technology”, VSRD-IJEECE, Vol. 2, Issue 6, 2012, 417-420.
[2] K. Kamarulazizi, dr.W. Ismail, “Electronic Toll Collection System Using Passive RFID
Technology”, Journal of Theoretical and Applied Information Technology.
[3] Aniruddha Kumawat1, Kshitija Chandramore, “Automatic Toll Collection system Using
Rfid”, International Journal of Electrical and Electronics Research, Vol. 2, Issue 2,2014, 67-72.
[4] Preeti Giri, Priyanka Jain “Automated Toll Collection System Using RFID Technology”,
IJARSE, Vol. 2, Issue 9, 2013.
[5] “Electronic Toll Collection”, Report by Apex Committee for ETC Implementation,
Government of India, September 2011.
[6] Priyanka Chhoriya, Govinda Paliwal, P. Badhan “Image Processing Based Automatic Toll
Booth in Indian Condition”, IJETAE, Vol 3, Issue 4, 2013.
[7] Zhengang, R., & Yingbo, G. (2009). “Design of electronic toll collection system in
expressway based on RFID”, ESIAT 2009, International Conference on, 2 (4-5July 2009), 779-
782.
[8] C.M. Roberts, “Radio Frequency Identification (RFID),” Computers & Security 25(2006),
18-26.
[9] Michael J. Pont, Embedded C, Edition 2002, Addison Wesley, Page: 55-86,215.
[10]The Basics of RFID, Veri-Logic, LLC, 2003. http://www.veri-
logic.com/documents/RFID.pdf
[11] Electronic Toll Collection, America’s Transportation Network.
www.nhai.org/doc/17feb12/etc_apexcomm_report_final_7oct.pdf
[12] Electronic Toll Collection System. http://ntl.bts.gov/lib/jpodocs/edldocs1/13480/ch5.pdf
[13] Intelligent Transportation System. http://www.metroinfrasys.com
[14] Electronic Toll and Traffic Management Indian Highways.
http://irc.org.in/ENU/knowledge/Editorial/July%202011.pdf

You might also like