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

ONLINE BUS PASS REGISTERATION FOR STUDENTS

“ONLINE BUS PASS REGISTRATION FOR STUDENTS”

A project report submitted in partial fulfilment

of requirement for the award of the degree of

BACHELOR OF COMPUTER APPLICATIONS

RANI CHANNAMMA UNIVERSITY, BELAGAVI.

Submitted by:

Ms. Rajashree Patil


Mr. Suyog Chavan

Under the guidance of

Prof. Aparna Mutnalkar


Prof. Priya Patil

Karnatak Law Society’s


GOGTE COLLEGE OF COMMERCE
Tilakwadi, Belgaum-590006
2019-2020

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Karnatak Law Society’s


GOGTE COLLEGE OF COMMERCE
Tilakwadi, Belgaum.
Bachelor of Computer Applications

CERTIFICATE

This is to certify that


Ms. Rajashree Patil Reg No. M1710499

Has satisfactorily completed the project work entitled

“ONLINE BUS PASS REGISTRATION FOR STUDENTS”

FOR THE FULFILLMENT OF BACHELOR OF COMPUTER


APPLICATIONS OF RANI CHANNAMMA UNIVERSITY, BELAGAVI,
FOR THE YEAR 2019-2020

Guide Coordinator Principal


Prof. Priya Patil Prof.V.S. Jalihal Dr.H.H.Veerapur

EXAMINERS

1. 2.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Karnatak Law Society’s


GOGTE COLLEGE OF COMMERCE
Tilakwadi, Belgaum.
Bachelor of Computer Applications

CERTIFICATE

This is to certify that

Mr. Suyog Chavan Reg No. M1710535

Has satisfactorily completed the project work entitled

“ONLINE BUS PASS REGISTRATION FOR STUDENTS”

FOR THE FULFILLMENT OF BACHELOR OF COMPUTER


APPLICATIONS OF RANI CHANNAMMA UNIVERSITY, BELAGAVI,
FOR THE YEAR 2018-2019

Guide Coordinator Principal


Prof. Aparna Mutnalkar Prof.V.S. Jalihal Dr.H.H.Veerapur

EXAMINERS:

1. 2.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Dedicated to
Teachers
and Friends

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

ACKNOWLEDGEMENT

“A helping hand, kind soul these are the ingredients that help to make a success out of any
effort.”

We take this opportunity to acknowledge the contribution of each individual who has in some

way or the other helped me in completing this project successfully. We express our gratitude

to our institute, Karnatak Law Society’s Gogte College Of Commerce (BCA Section),

Belgaum and our Principal Dr.H.H.Veerapur for being the source of encouragement.

We also enhance our gratitude to our beloved Prof.Venugopal Jalihal, coordinator BCA

Dept for his constant inspiration and for providing necessary resources and working

environment in the college. With pleasure, we use this occasion to concede our heartfelt

thanks to Prof. Priya Patil and Prof. Aparna Mutnalkar our internal guide who has guided

us with her valuable suggestions & guidance. Our expressions extend unbounded to thank our

most beloved parents & family members who have always been a moral support & strong

pillars at every stage of our life with cheer enthusiasm. We dedicate our work to them.

Last but not least, we are thankful to Almighty moral support, which helped us during the

successful completion of the project.

With heartfelt thanks to One &All,

Rajashree Patil & Suyog Chavan

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

INDEX

SL.NO TOPIC PAGE

1) Synopsis of the project 08

2) Introduction to area. 09

3) Objective and scope of the project 13

4) System Analysis and Design 15


4.1. Analysis of Existing system
4.2. Analysis of Proposed system.
4.3. Feasibility Study.

5) User Requirement System Planning. 19


5.1 Introduction.
5.2 Developers Responsibilities overview.
5.3 System Requirements.
5.4 Pert chart and Gantt chart.
6) Methodology 24

7) System Implementation and details of Hardware 29


and Software Used.
7.1 System Requirement.
7.2 System Maintenance and Evaluation.
7.3 Total Output of System.
7.4 Feature Enhancement.
8) Detailed Life Cycle of the Project 33
8.1Data Flow Diagram (DFD).
8.2 Use Case Diagram.
8.3 Entity Relationship Diagram (ERD)..

9) Coding 42

10) Methodology Used For Testing. 66


10.1 Software Testing.
10.2Test Case.
GOGTE COLLEGE OF COMMERCE BCA
ONLINE BUS PASS REGISTERATION FOR STUDENTS

10.3 Table Design.


11) Input and Output Screen Layouts. 74

12) Conclusion 87

13) Future Enhancement 89

14) References 91

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

SYNOPSIS

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

INTRODUCTION

Online bus pass registration system is a web application for students to get bus pass
through online. This system was intended to develop an application for K.S.R.T.C to reduce
manual work for employees and also it provides timesaving, comfortable and safe services
for the students.

It is real time project which is useful for the students who are facing problems with
the current manual work of bus pass registration. This system is helpful for the students to get
bus pass from anywhere in the state.

USER OF THIS SYSTEM


1. Administration.
2. Students.

MODULES
1. Administration
 Manage profile: It manages the profile of users.
 Approval of the Documents: Approving the documents after it is been verified.
 SMS alert: Gives an alert to the student about approval of the documents,
payment alerts and generating pass.

2. Student
 Member Registration: Student can create his\her account for bus pass
registration.
 Login: Students can login for the registration and renewal of the bus pass.
 Pass Registration: Student can apply for bus pass registration
 Edit: Student can edit his\her details.
 Generate Pass: After the approval of given Id proof and payment is paid, student
can generate their pass.

3. Verification

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

 Documents Verification: Scanned documents are verified through online which


are submitted by the students.
 Notification: It notifies to the admin whether the documents are approved or not.

4. Payment
 Accepting payments: Accepts payment through online resources like Google
pay, Phonepe, BHIM UPI, Debit cards, Net banking etc.

HARDWARE REQUIREMENTS
 i3 Processor and above.
 Minimum of 4 GB RAM.
 Hard disk of 512 MB and above.

SOFTWARE REQUIREMENTS
 Browser - Google Chrome, Mozilla Firefox, Internet Explorer.
 IDE - Adobe Dreamweaver.
 Front end - HTML,CSS with JavaScript
 Back end - PHP.
 Database – Wampserver.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Abstract

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

ABSTARCT
Online bus pass Generation system is a web application for Students to get Bus passes
through online. This system was intended to develop an application to perform functionalities
like accessing the basic information for authentication and provide Bus pass to a particular
student without placing him/her in a queue for a long time. Online bus pass generation system
is helpful as it reduces the paper work, time consumption and makes the process of getting
bus pass in simple and faster way. Student can refill their account and renew the validity
every time when the pass expires. Admin can view all users’ details and balance through its
login. This system is helpful to get bus pass from anywhere in the Karnataka state and no
need to worry about renewal of the Bus pass.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Objective
And
Scope

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Objective and Scope of the project


Online bus pass registration system is a web application for students to get bus pass
through online.

Primarily, the goal behind selecting this topic and trying to build web application is to help
the students who face problems in manual work of registering for the bus pass. It saves the
time of the students and provides safe services. It is very useful for the government as it
reduces man power and saves a lot of money which is paid to the employees. As it is a digital
era, registering digitally is easier and faster way for the students.

The key components of Online Student Bus Pass Registration system is


 Bus Pass generation.
 Bus Pass renewal.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

SYSTEM
ANALYSIS
AND
DESIGN

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

SYSTEM ANALYSIS AND DESIGN


SYSTEM ANALYSIS

It is a process of collecting and interpreting facts, identifying the problems, and


decomposition of a system into its components.

System analysis is conducted for the purpose of studying a system or its parts in order to
identify its objectives. It is a problem-solving technique that improves the system and
ensures that all the components of the system work efficiently to accomplish their purpose.

Analysis specifies what the system should do.

SYSTEM DESIGN

It is a process of planning a new business system or replacing an existing system by defining


its components or modules to satisfy the specific requirements. Before planning, you need to
understand the old system thoroughly and determine how computers can best be used in
order to operate efficiently.

System Design focuses on how to accomplish the objective of the system.

Existing System

In the existing system of bus pass registration and renewal process are carried out manually.
In these system students are required to fill the application forms along with their details and
they should visit the counter and have to submit the bus pass application and other particular
details and they have to wait for approval. These application forms are to be verified and then
the bus pass is issued to the concerned person after the application forms are verified. In this
existing system administrator used to maintain the details of respective students through a
file. Administrator has to maintain all the details of student and his documents. And, also he
has to maintain team information and also efforts estimation which is much of time
consuming process and more importantly it is error prone.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

In this existing system students need to wait for hours for the bus pass approval. This is a
tedious process, which requires the students to stand in long queues to get their passes. These
existing system leads to a lot of time wastage for the students. Also, the bus pass issue takes
place only for a limited period of time during the day that is until evening. The students may
not be able to acquire their passes once the counters at the bus stands are shut down in the
evening.

Disadvantages:

• It is time consuming

• It consumes lot of manpower for better results

• It lacks of data security

• Retrieval of data takes lot of time

• Percentage of accuracy is less

• Reports take time to produce

Proposed System

Online bus pass registration system is a web application for students to get bus pass
through online. This system was intended to develop an application for K.S.R.T.C to reduce
manual work for employees and also it provides timesaving, comfortable and safe services
for the students.

It is real time project which is useful for the students who are facing problems with the
current manual work of bus pass registration. This system is helpful for the students to get
bus pass from anywhere in the state.

Advantages:

 This online bus pass software system will help students to get bus passes online and
eliminate the need of standing in queues for passes.
 The payment can be done via online banking.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

 It is a fast process
 Information is accurate
 It is not time consuming
 It doesn't consumes lot of man power for better results
 To make efficient and accurate calculations.
 To provide proper information.
 To provide huge Maintenance of records.
 Easily renewal of passes

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Feasibilit
y Study

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

FEASIBILITY

The feasibility study is an evaluation and analysis of the potential of a proposed project

which is based on exclusive investigation and research to support the process of decision

making. The main objective of the feasibility study is to test the technical and economical

feasibility of developing the computer system. A system is feasible system if it is feasible

within limited resources and time.

The key Consideration in Feasibility Study Are:

1. Technical Feasibility.

2. Economical Feasibility.

3. Behavioural Feasibility.

1. Technical Feasibility:

“Technical feasibility is concerned with availability and capability of Software, Hardware

and people”. Technical Feasibility centres on the existing computer system (hardware,

software etc.) and to what extent it can support the proposed addition. The proposed system

can be implemented with the existing technology with few changes easily.

 Since the project is designed in HTML. It can be easy to install in all the system

whenever needed.

 It is more efficient, easy and user-friendly to understand by almost everyone. Huge

amount of data can be handled efficiently using MySQL in wampserver as back end.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

 Hence the proposed system is technically feasible.

2. Economical Feasibility:

“Economical analysis is the most used method for evaluating the effectiveness of the

proposed system”.

In the present system, the development of new product greatly enhances the accuracy of the

system. The errors can be greatly reduced and at the same time providing a great level of

security. There is no need of any additional equipment except memory of

required capacity Hence the proposed system is economical feasible i.e. efficient, reliable and

also quickly responding.

3. Behavioural Feasibility:

People are inherently resistant to change, and computers have been known to facilitate

change. In behavioural feasibility an estimate is made of how strong attraction the customer

is likely to have towards the development of a computerized system. Real time automation

system website provides a very simple Graphical User Interface (GUI) to the customers. The

Real time automation system website is accustomed to computerized systems. Hence, this

system is operational feasible.

As this system is technically, economical and operationally feasible, this system is judged

feasible.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

PERT CHART
A PERT chart is a graphic representation of a project’s schedule, showing the sequence of
tasks, which tasks can be performed simultaneously, and the critical path of tasks that must
be completed on time in order for the project to meet its completion deadline. The chart can
be constructed with a variety of attributes, such as earliest and latest start dates for each task,
earliest and latest finish dates for each task, and slack time between tasks. A PERT chart can
document an entire project or a key phase of a project. The chart allows a team to avoid
unrealistic timetables and schedule expectations, to help identify and shorten tasks that are
bottlenecks, and to focus attention on most critical tasks.

Because it is primarily a project-management tools, a PERT chart is most useful for planning
and tracking entire projects or for scheduling and tracking the implementation phase of
planning or improvement effort.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Start Initial Study

Phase Days Phase Days

0 0 day 1 8 days

Design

Phase Days

3 25 days

Requirement Analysis

Phase Days

2 10 days

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Coding Testing

Phase Days Phase Days

4 30 days 5 10 days

Final Document Implementation

Phase Days Phase Days

7 6 days 6 8 days

GANTT CHART

A Gantt chart is a popular tool in project management. It basically drills down activities

which need to be done by a fixed time period. It is commonly used for tracking project

schedules. It schedules the start and finish dates of the terminal elements and summary

elements of a project.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

On the chart, tasks are shown on the vertical axis while they scheduled time-spend is laid out

on the horizontal axis. Each task is represented by a bar that shows the time required for the

project.

Gantt chart is useful tool in planning and scheduling the projects. It keeps the management

updated as to when the project will get completed. It also keeps the management informed

about any additional resources that are required and manage dependencies between tasks.

Gantt chart
Week 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Analysis of

System

Requirements

Analysis

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Designing

Coding /

Implementation

Testing

Documentation

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

System Implementation and Hardware and Software Used.

The implementation phase is the process of converting a new system design into an
operational once. The main steps include:

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Hardware requirements:

 i3 Processor and above.

 Minimum of 4 GB RAM.

 Hard disk of 512 MB and above.

Tools and Languages:

To develop this software, we have used the following tools and languages.

 Editor

o Adobe Dreamweaver

 Front End

o HTML 5

o CSS

o JavaScript / jQuery

 Backend

o PHP

 Browser

o Google Chrome

o Mozilla Firefox

TECHNOLOGY USED

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

1. HTML (Hypertext Mark-up Languages)


HTML, which stands for hypertext mark-up language, is the mark-up language for
web pages. A mark-up language is a set of mark-up tags, and HTML uses mark-up tags to
describe web pages.
HTML is the building blocks of all basic websites. It allows images and objects to be
embedded and can be used to create interactive forms. It provides a means to create
structured documents by denoting structural semantics for text such as headings, Paragraphs,
lists, links, quotes and other items. It can embed scripts in languages such as JavaScript
which affect the behaviour of HTML WebPages. HTML can also be used to include
Cascading Style Sheets (CSS) to define the appearance and layout of text and other material.
HTML is written in the form of HTML elements consisting of “tags” surrounded by
angular brackets (like <html>) within the web page content. The first tag in a pair is the start
tag, the second tag is the end tag (they are also called opening tags and closing tags).

2. CSS (Cascading Style Sheets)

CSS stands for Cascading Style Sheets CSS describes how HTML elements are to be
displayed on screen, paper, or in other media CSS saves a lot of work. It can control the
layout of multiple web pages all at once External style sheets are stored in CSS files

CSS is designed to enable the separation of presentation and content, including layout,
colours and fonts. This separation can improve content accessibility, provide more flexibility
and control in the specification of presentation characteristics, enable multiple web pages to
share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity
and repetition in the structural content.
3. JavaScript

JavaScript is an object-oriented, client-side scripting language, which means the source


code is processed by the client's web browser rather than on the web server. This means
JavaScript function scan run after a webpage has loaded without communicating with the
server. This means JavaScript function scan run after a webpage has loaded without
communicating with the server. It is a text-based programming language meant to run as a
part of a web-based application. JavaScript is one of the three pillars of web development- the

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

other two being HTML and CSS. It was purposely designed to integrate into HTML. All
major web browsers support JavaScript.

4. PHP

PHP is a widely-used open source general purpose scripting language that is especially suited
for web development and can be embedded into HTML . It is an acronym for "PHP:
Hypertext Pre-processor". It is a widely-used, open source scripting language. Its scripts are
executed on the server. It is free to download and use.

PHP can generate dynamic page content. It can create, open, read, write, delete, and close
files on the server and can also add, delete, modify data in your database It can be used to
control user-access It can encrypt data It runs on various platforms (Windows, Linux, Unix,
Mac OS X, etc.).It supports a wide range of databases

5. SQL (Structured query Language)

SQL is a standardized programming language that's used to manage relational databases and
perform various operations on the data in them. The uses of SQL include modifying database
table and index structures, adding, updating and deleting rows of data, and retrieving subsets
of information from within a database for transaction processing and analytics applications.
Queries and other SQL operations take the form of commands written as statements --
commonly used SQL statements include select, add, insert, update, delete, create, alter and
truncate.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

DETAILED
LIFE
CYCLE OF
THE
PROJECT

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Data Flow Diagrams:


Data Flow Diagrams (DFD):
A Data Flow Diagram is graphical aid for defining systems input, process and outputs. It
represents increasing information flow and function details.

A DFD shows the flow of data through a system. A system may be an organization, a
manual procedure, software system, mechanical system, a hardware system or any
combinations of these. A DFD shows the movement of data through different processes in the
system DFD’s are made of a number of symbols, which represents system components like
process, data flow and external entities.

a) Process:
Process show that systems do each process can have one or more inputs or outputs. A
process in DFD is represented as hollow cylinder. And each process has unique name and
number.

b) Data Store:
A file or data store is repository of data. Each data store is represented by an open sided
rectangle and each store and has unique name. The symbol of data store is.

c) External Entities:
External entities are outside the system but they either supply input into system or use the
system output. They may be an organization’s customer or otherswhich system interacts.
External entities, which supply data to the system, are sometimes called as ‘sinks’. These are
represented by a rectangle in the DFD.

d) Data Flow

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Data flow indicates the passage of data in the system, from where the data flows. It is
indicated by an arrow which indicates the direction of flow. The arrow is labelled by the
name of the data flow.

Flow of data in the system could be any one of the following:

 From a data store to a process.


 From source to process.
 From a process to a sink.

CONTEXT LEVEL DAIGRAM

ONLINE BUS PASS


REGISTRATION FOR
User Info STUDENTS User Info
USER ADMIN
Approval Approval

Verification

User Info

VERIFIER

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Registration

Login LOGIN DB

STUDENT
3
STUDENT
Fill Application Form

4 STUDENT DB
View Student Details

ADMIN
5

Verification

Generate
Message

VERIFIER 7
TRANS DB
Transaction

8
GOGTE COLLEGE OF COMMERCE BCA Generate Pass
ONLINE BUS PASS REGISTERATION FOR STUDENTS

I. USE CASE DIAGRAM

A use case is a methodology used in system analysis to identify, clarify, and organize system

requirements. In this context, the term "system" refers to something being developed or

operated, such as a mail-order product sales and service Web site. Use case diagrams are

employed in UML (Unified Modelling Language), a standard notation for the modelling of

real-world objects and systems.

System objectives can include planning overall requirements, validating a hardware design,

testing and debugging a software product under development, creating an online help

reference, or performing a consumer-service-oriented task. For example, use cases in a

product sales environment would include item ordering, catalog updating, payment

processing, and customer relations. A use case diagram contains four components.

 The boundary, which defines the system of interest in relation to the world around it.

 The actors, usually individuals involved with the system defined according to their roles.

 The use cases, which the specific roles are played by the actors within and around the

system.

 The relationships between and among the actors and the use cases.

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Registration

Login

Application Form

View Student Details


STUDENT

Verification

Generate Message
ADMIN

Transaction

Generate Pass

Logout
VERIFER

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Entity – Relationship Diagram


ER diagram is a popular high level conceptual data model and its variations are frequently
used for the conceptual design of the database design tools employ its concepts. It is used in
the design of conceptual schemas for database applications.

Entities and attributes:


The basic object that the ER model represents is an entity, which is a “thing” in the real world
with an independent existence. An entity may be object with a physical existence a particular
person car or employee or it may be an object with conceptual existence particular properties
that describes it.

Ex: A client entity may be described by the client name, client project name etc. A particular
entity will have a value for each of its attributes.

These are following types of attributes:

 Simple
 Composite
 Single valued
 Stored
 Derived
 Multi valued

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Entity – Relationship Diagram

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

SCHEMA DIAGRAM

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Coding

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

config.php
<?php
/* Database credentials. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_NAME', 'busPassApp');

/* Attempt to connect to MySQL database */


$con = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD,
DB_NAME);

// Check connection
if($con === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
?>

index.php
<?php
// Initialize the session
session_start();

// Check if the user is logged in, if not then redirect him to login page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
header("location: views/dashboard.php");
exit;
}
$url_RegType = 'admin';

?>

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="css/reg.css"/>
</head>
<body>
<div id="pWrapper">
<div class="headerContainer">
<div class="imgcontainer">
<div class="imgPanel">
<img src="img/KSRTC_logo.png" alt="logo"/>
</div>

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

<div class="titlePanel">
<h1>KARNATAKA STATE ROAD
TRANSPORT CORPORATION</h1>
</div>
</div>
<div class="loginPanel">
<form id="logSubFrm" action="#" method="post">

<input type="text" name="uName" id="uName"


placeholder="Enter Email"/>
<input type="password" name="uPsw"
id="uPsw" placeholder="Enter Password"/>
<button type="submit" id="btn"
name="btn">Login</button>
<span class="errorLogFrm"></span>
<label id="frgt"><a
href="forgotPassword.html">Forgot Password?</a></label>
</form>
</div>
</div>
<hr>
<div class="bodyContainer">
<div class="col-2">
mjgjgjgjg
</div>
<div class="col-2">
<?php
if($url_RegType === 'admin')
{
?>
<form>
<input type="button" value="check"/>
</form>

<?php
}else{
?>

<form id="logRegFrm" action="#" method="post">


<div class="container">
<h1>Create an Account</h1>
<p>Fill in this form to create an account.</p>
<span class="errorFrm"></span>
<hr>
<label><b>Email</b></label>
<input type="text" placeholder="Enter User
Name" name="username" id="username"
onBlur="busPassApp.enterprise.checkEmail(this);">

<label><b>Password</b></label><br/>

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

<label><strong>Note:</strong> Password min


8 to 15 characters &amp; atleast 1 lowercase, 1 uppercase, 1 numeric, &amp; 1
special</label>
<input type="password" placeholder="Enter
Password" name="password" id="password"
onBlur="busPassApp.enterprise.CheckPassword(this);">

<label><b>Repeat Password</b></label>
<input type="password" placeholder="Repeat
Password" name="confirm_password" id="confirm_password">

<button type="reset" id="cancelbtn"


name="cancelbtn">Cancel</button>
<button type="submit" id="signupbtn"
name="signupbtn">Sign Up</button>
</div>
</form>

<?php
}
?>
</div>
</div>
<div class="footerContainer">
<div class="row-3">
<label><i class="fa fa-envelope" aria-
hidden="true">:suyogchavan412@gmail.com</i></label>
</div>
<div class="row-3">
<label><i class="fa fa-globe" aria-
hidden="true">:www.ksrtcbusspass.org</i></label>
</div>
<div class="row-3">
<label><i class="fa
fa-phone-square"></i>:7411875097</i></label>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="js/reg.js"></script>
<script type="text/javascript">

$(document).ready(function() {
busPassApp.enterprise.initSubmitAction();
busPassApp.enterprise.initLogSubmitAction();
});
</script>
</html>

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

css file

body
{
font-family: Arial, Helvetica, sans-serif;
padding: 0px;
margin: 0px;
}
h1
{
font-size: 20px;
}
hr {
border: 1px solid black;
margin-bottom: 25px;
}

#pWrapper
{
width: 100%;
/*height: auto;*/
float: left;
}
#pWrapper .headerContainer
{
width: 100%;
float: left;
/*height: 90px;*/
}
#pWrapper .headerContainer .imgcontainer
{
width: 50%;
/*height: 90px;*/
float: left;
}
#pWrapper .headerContainer .imgcontainer .imgPanel
{
width: 15%;
float: left;
}
#pWrapper .headerContainer .imgcontainer .titlePanel
{
width: 85%;
float: left;
margin: 30px 0px;
}
#pWrapper .headerContainer .loginPanel
{
margin: 20px;
width: calc( 50% - 40px);

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

float: left;
/*height: 90px;*/
}
#pWrapper .headerContainer .loginPanel input
{
width: 33.33%;
padding: 10px 10px;
margin: 20px 25px;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
border-radius: 10px;
border: none;
background: #f1f1f1;
}
#pWrapper .headerContainer .loginPanel button {
background-color: #ADADAD;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 15%;
border-radius: 10px;
}
#pWrapper .headerContainer .loginPanel label#frgt {
float: right;
margin-right: 10px;
font-size: 14px;
}
img
{
border-radius: 50%;
width: 100px;
height: 90px;
}

#pWrapper .bodyContainer
{
width: 100%;
}
#pWrapper .bodyContainer .col-2
{
width: 50%;
float:left;
}
#pWrapper .bodyContainer .col-2 .container
{
padding: 16px;
background-color: white;

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

#pWrapper .bodyContainer .col-2 .container input {


width: 100%;
padding: 15px;
margin: 5px 0 22px 0;
display: inline-block;
border: none;
background: #f1f1f1;
border-radius: 10px;
}

input:focus {
background-color: #ddd;
outline: none;
}

#pWrapper .bodyContainer .col-2 .container button


{
background-color: #ADADAD;
color: white;
padding: 15px;
margin: 8px 0;
margin-right: 10px;
border: none;
cursor: pointer;
width: 15%;
border-radius: 10px;
}
button:hover {
background-color: #ddd;
outline: none;
}
.footerContainer
{
width: 100%;
float: left;
background-color: #726D6D;
}
.footerContainer .row-3
{
width: calc(33.33% - 10px);
float: left;
text-align: center;
margin: 10px 0px;
}
span.errorInput {
padding-left: 10px;
color: red;

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

form#logSubFrm {
position: relative;
}

span.errorLoginInput {
position: absolute;
color: red;
bottom: -10px;
}
#uName + span.errorLoginInput {
left: 30px;
}
#uPsw + span.errorLoginInput{
right: 135px;
}
span.errorLogFrm {
position: absolute;
top: -5px;
left: 30px;
color: red;
}

.js file

var busPassApp = busPassApp || {};

busPassApp.enterprise ={
init: function()
{

},
CheckPassword: function($this)
{ debugger;
var strongRegex = new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!
@#\$%\^&\*])(?=.{8,})");
var pswStr = $($this).val();

$($this).prev().find('.errorInput').remove();

if(strongRegex.test(pswStr))
{
return true;
}
else
{
$($this).prev().append('<span class="errorInput">[<b>Error:</b>Enter
a Valid Password]</span>');
$($this).focus();

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

return false;
}
},
checkEmail: function($this)
{
//debugger;
var emailStr = $($this).val();

$($this).prev().find('.errorInput').remove();

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(emailStr))
{
return (true);
}
else
{

$($this).prev().append('<span class="errorInput">[<b>Error:</b>Enter a
Valid Email]</span>');
$($this).focus();
return (false);
}
},
resposeError: function(response)
{
$('.errorFrm').empty();
$('.errorInput').remove();

//var response = {c: "", password_err: "", confirm_password_err: "", error: "",
IsSuccess: 0};
if(response.IsSuccess == 0)
{
if(response.username_err != "")
{
$('#username').prev().find('.errorInput').remove();
$('#username').prev().append('<span
class="errorInput">[<b>Error:</b>'+response.username_err+']</span>');
}
if (response.password_err != "")
{
$('#password').prev().find('.errorInput').remove();
$('#password').prev().append('<span
class="errorInput">[<b>Error:</b>'+response.password_err+']</span>');
}
if(response.confirm_password_err != "")
{
$('#confirm_password').prev().find('.errorInput').remove();
$('#confirm_password').prev().append('<span
class="errorInput">[<b>Error:</b>'+response.confirm_password_err+']</span>');
}

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

if(response.error != "")
{
$('.errorFrm').text(response.error);
}
}
},
initSubmitAction: function()
{
// process the form
$('#logRegFrm').submit(function(event) {

// get the form data


// there are many ways to get this data using jQuery (you can use the
class or id also)
var formData = {
'username' : $('input[name=username]').val(),
'password' : $('input[name=password]').val(),
'confirm_password' :$
('input[name=confirm_password]').val()
};

// process the form


$.ajax({
type : 'POST', // define the type of HTTP verb we want to
use (POST for our form)
url : 'models/signupProcess.php', // the url where we want
to POST
data : formData, // our data object
dataType : 'json', // what type of data do we expect back from
the server
success:function(response){
debugger;
console.log(response);
busPassApp.enterprise.resposeError(response);
////busPassApp.enterprise.checkEmail(this);
}
// encode : true
// })
// // using the done promise callback
// .done(function(data) {
//
// // log data to the console so we can see
// console.log(data);

// here we will handle errors and validation messages


});

// stop the form from submitting the normal way and refreshing the
page
event.preventDefault ();

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

});
},

initLogSubmitAction: function()
{
// process the form
$('#logSubFrm').submit(function(event) {

// get the form data


// there are many ways to get this data using jQuery (you can use the
class or id also)
var formData = {
'uName' : $('input[name=uName]').val(),
'uPsw' : $('input[name=uPsw]').val(),

};

// process the form


$.ajax({
type : 'POST', // define the type of HTTP verb we want to
use (POST for our form)
url : 'models/loginProcess.php', // the url where we want to
POST
data : formData, // our data object
dataType : 'json', // what type of data do we expect back from
the server
success:function(response){
debugger;
console.log(response);
if(response.IsSuccess == 1)
{

window.location.replace("http://localhost/buspassapp/views/dashboard.php");
}
else
{
if(response.username_err != "")
{
$('#uName
+ .errorLoginInput').remove();
$('#uName').after('<span
class="errorLoginInput">'+response.username_err+'</span>');
}
if (response.password_err != "")
{
$('#uPsw + .errorLoginInput').remove();
$('#uPsw').after('<span
class="errorLoginInput">'+response.password_err+'</span>');
}
if(response.error != "")

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

{
$('.errorLogFrm').text(response.error);
}
}

event.preventDefault();
});
}
};

signupProcess.php

<?php

// Include config file


require_once "config.php";

// Define variables and initialize with empty values


$username = $password = "";
$username_err = $password_err = $confirm_password_err = $error = "";
$IsSuccess = 0;
$msg_arr = array();

// Processing form data when form is submitted


if($_SERVER["REQUEST_METHOD"] == "POST"){

// Validate username
if(empty(trim($_POST["username"]))){
$username_err = "Please enter a username.";
} else{
// Prepare a select statement
$sql = "SELECT id FROM users WHERE username = ?";

if($stmt = mysqli_prepare($con, $sql)){


// Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "s", $param_username);

// Set parameters
$param_username = trim($_POST["username"]);

// Attempt to execute the prepared statement


if(mysqli_stmt_execute($stmt)){
/* store result */
mysqli_stmt_store_result($stmt);

if(mysqli_stmt_num_rows($stmt) == 1){
$username_err = "This username is already taken.";
} else{

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

$username = trim($_POST["username"]);
}
} else{
$error = "Oops! Something went wrong. Please try again later.";
}

// Close statement
mysqli_stmt_close($stmt);
}
}

// Validate password
if(empty(trim($_POST["password"]))){
$password_err = "Please enter a password.";
} elseif(strlen(trim($_POST["password"])) < 6){
$password_err = "Password must have atleast 6 characters.";
} else{
$password = trim($_POST["password"]);
}

// Validate confirm password


if(empty(trim($_POST["confirm_password"]))){
$confirm_password_err = "Please confirm password.";
} else{
$confirm_password = trim($_POST["confirm_password"]);
if(empty($password_err) && ($password != $confirm_password)){
$confirm_password_err = "Password did not match.";
}
}

// Check input errors before inserting in database


if(empty($username_err) && empty($password_err) && empty($confirm_password_err)
&& empty($error)){

// Prepare an insert statement


$sql = "INSERT INTO users (username, password) VALUES (?, ?)";

if($stmt = mysqli_prepare($con, $sql)){


// Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "ss", $param_username, $param_password);

// Set parameters
$param_username = $username;
$param_password = password_hash($password, PASSWORD_DEFAULT); //
Creates a password hash

// Attempt to execute the prepared statement


if(mysqli_stmt_execute($stmt)){
// Redirect to login page
//header("location: login.php");

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

$IsSuccess = 1;

} else{
//echo "Something went wrong. Please try again later.";
$IsSuccess = 0;
}

// Close statement
mysqli_stmt_close($stmt);
}
}

// Close connection
mysqli_close($con);

$msg_arr = array("username_err" => $username_err, "password_err" =>


$password_err, "confirm_password_err" => $confirm_password_err, "error" => $error,
'IsSuccess' => $IsSuccess);

// encoding array to json format


echo json_encode($msg_arr);
}
?>

loginProcess.php

<?php
// Initialize the session
session_start();

// Include config file


require_once "config.php";

// Define variables and initialize with empty values


$uName = $uPsw = "";
$username_err = $password_err = $error = "";
$msg_arr = array();
$IsSuccess = 0;

// Processing form data when form is submitted


if($_SERVER["REQUEST_METHOD"] == "POST"){

// Check if username is empty


if(empty(trim($_POST["uName"]))){
$username_err = "Please enter username.";
} else{
$uName = trim($_POST["uName"]);
}

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

// Check if password is empty


if(empty(trim($_POST["uPsw"]))){
$password_err = "Please enter your password.";
} else{
$uPsw = trim($_POST["uPsw"]);
}

// Validate credentials
if(empty($username_err) && empty($password_err)){
// Prepare a select statement
$sql = "SELECT id, username, password FROM users WHERE username = ?";

if($stmt = mysqli_prepare($con, $sql)){


// Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "s", $param_username);

// Set parameters
$param_username = $uName;

// Attempt to execute the prepared statement


if(mysqli_stmt_execute($stmt)){
// Store result
mysqli_stmt_store_result($stmt);

// Check if username exists, if yes then verify password


if(mysqli_stmt_num_rows($stmt) == 1){
// Bind result variables
mysqli_stmt_bind_result($stmt, $id, $uName, $hashed_password);
if(mysqli_stmt_fetch($stmt)){
if(password_verify($uPsw, $hashed_password)){
// Password is correct, so start a new session
//session_start();

// Store data in session variables


$_SESSION["loggedin"] = true;
$_SESSION["id"] = $id;
$_SESSION["uName"] = $uName;
$IsSuccess = 1;
// Redirect user to welcome page
// header("location: view/dashboard.php");
} else{
$IsSuccess = 0;
// Display an error message if password is not valid
$password_err = "The password you entered was not valid.";
}
}
} else{
// Display an error message if username doesn't exist
$username_err = "No account found with that username.";
}

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

} else{
$error = "Oops! Something went wrong. Please try again later.";
}

// Close statement
mysqli_stmt_close($stmt);
}
}

// Close connection
mysqli_close($con);

$msg_arr = array("username_err" => $username_err, "password_err" =>


$password_err, "error" => $error, "IsSuccess" => $IsSuccess);

// encoding array to json format


echo json_encode($msg_arr);
}
?>

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Methodology
Used For
Testing

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

SCREENSHOTS

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Annexure

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

Conclusion

GOGTE COLLEGE OF COMMERCE BCA


ONLINE BUS PASS REGISTERATION FOR STUDENTS

CONCLUSION

This project is useful for the students who are facing problems with the current manual work
of bus pass registration. It saves the time of the students to apply manually and stand in the
queue for long time and also reduces the manpower.

GOGTE COLLEGE OF COMMERCE BCA

You might also like