Web-Based Voting System Implementation
Web-Based Voting System Implementation
SYSTEM
By
Registration no:
U14/NAS/CSC/081
Being a BSc report submitted in partial fulfillment of the requirements for the
award of a Bachelor’s degree in Computer Science of the
………, 2018
CERTIFICATION
This is to certify that this research titled online voting system is an original work of
This is to certify that this research titled online voting system was carried out by
Ubaka Ifechukwu Joshua, Registration No: U14/NAS/CSC/081 of the department
of Computer Science in partial fulfillment of the requirements for the award of
Bachelor of Science in Computer Science.
________________________ _________________________
Project Supervisor
________________________ _________________________
Head of Department
ACKNOWLEDGMENT
My gratitude goes to God Almighty who made it possible for me to come this far
in my Academic pursuit. Without the guidance of my ever listening supervisor,
Mr. Micheal Kanife this work would not have been this successful. I appreciate
your support, encouragement towards me. Also wish to appreciate my Head of
Department for the help rendered and all her advises to the [Link] regard
also goes to MRS. NJIDEKA ONOS, [Link], and Dr OZORFOR for their
support and advises. I wish to thank my parents Mr & Mrs UBAKA for their
immense support. To all my relatives and [Link] gratitude also goes to all my
friends Johnbosco, Chummy, Chidera, Ifeanyi, Hector, Obinna, Buffy, Chambers,
Fenzy and all others who assisted me in one way or another to make my project
successful and also made my stay in Godfrey Okoye University peaceful.
TABLE OF CONTENTS
Title page
Certification
Dedication
Approval page
Acknowledgement
Table of Contents
Abstract
CHAPTER ONE:
CHAPTER TWO:
2.0 Introduction
2.3 Summary
CHAPTER THREE:
3.0 Introduction
3.0.1 Methodology
3.1 Analysis of the existing system
CHAPTER FOUR:
4.0 Introduction
4.4 Documentation
CHAPTER FIVE:
5.0 Summary
5.1 Conclusion
5.2 Recommendation
Reference
Appendix
ABSTRACT
The project focuses on developing software for a web based voting system which
will enable them to register, login with the voters card number, insert card
number, count vote by clicking a button, view all registered voters and also give
room for editing of errors. The objectives of this is to Conduct free and fair
election since voters do not need to come to polling station, Safeguard data and
information in the system by creating a relational database, to reduced workload
in the process of conducting election, to keep accurate record of votes for future
purpose, it will reduce time wasted in announcing election result since, once the
period of voting is over, the system will not accept votes again, each voter is
eligible to cast vote once the system allows the person to register. The
methodology used in this project is Unified Modeling Language. UML is designed
to enable users to develop an expressive, ready to use visual modeling language. In
addition, it supports high level development concepts such as frameworks, patterns
and collaborations. It was implemented using sublime text on a Microsoft
windows system using HTML codes, PHP, CSS and MySQL language for the
relational database. The result gotten from this project was a web based voting
system.
CHAPTER ONE
INTRODUCTION
1.0 INTRODUTION
Today the Internet has been a fair concept that has profoundly affected our daily
lives. As with anything new the internet possesses various mysteries. The
advancement made in technology over the past few years is astounding. The
computer alone has progressed at a remarkable pace, and updates are continually
occurring. Online voting system opens the door to all sorts of possibilities for our
state (country) voting future. One basic feature of democracy that cuts across all
kinds of people is the act of election. Democracy thus encourages individual
freedom according to the rule of law, so that people may behave and express
themselves as they choose their leader. This not only gives people a chance to
choose their leaders, but also to freely express their views on issues.
Alvarez R.M, Hall, T.E and Trechsel, A.H. Thus, voting is a method by which group
of people make decisions. These decisions could be political, social or public.
Voting is also a means of selecting or choosing leaders, it does not apply only to
local government, states and federal government of Nigeria but also in different
institutions and social organization.
For democracy to be sound, it should be free and fair.
Over the years, the voting system in Nigeria has been put under a manual system
of operation which mostly results to inaccuracy and ineffective election.
It is gradually being realized that much faster accurate, effective and efficient
system is needed to be adopted. Here, on-line system is to be adopted to handle
voting.
This on-line voting system ensures that each intended voter is checked whether
he/she is registered or not, if he/she is not registered, the system refuses him
voting. Also it checks whether he/she has voted for that particular election. This
on-line voting system prevents a situation where a particular candidate seizes the
voters’ cards, and uses them to vote for himself. Hence the rigging associated with
the manual voting systems has been completely handled. The system also takes
care of result calculation of each candidate in particular election and the percentage
scored in that election. This eliminates rigging associated with the calculation and
counting of votes.
A means of showing the various outputs is also adopted by the system, the output
can either be displayed on the screen or a hard copy of it can be produced
depending on the choice of the user. This prevents intentional and unintentional
typographical errors in showing the results of the elections.
With an on-line voting, voters can only cast once; it will also afford people who
are sick and unable to go to polling stations to cast their vote.
CHAPTER TWO
LITERATURE REVIEW
2.0 INTRODUCTION
The idea of online voting system which is to reduce anonymity and increase
transparency was addressed by David Chaum. Online voting tends to take the place
of traditional way of voting in order to reduce both human and material cost of
voting in especially developing countries like Nigeria.
Most people who have in one way or the other have done work in online voting
system seem to agree that online voting does not actually meet the requirement for
public elections and that the current method of voting needs improvement.
Online voting system has disadvantages based on the areas of secrecy and
protection against corruption and/or vote selling. The national attention to
problems with current methods of casting and counting votes in public elections
was brought about, by the Kenyan General elections of 2007. Most people believe
and advice that the current system should be changed; there is much disagreement
on how such changes should be made.
Each HTML tag in the web document has a function it does on the web [Link]
if I write
<html>
<head>
<title>Online Voting System</title>
</head>
<body bgcolor="gray">
<p></p>
<h2 align="center"> Online Voting System <br /><br /> by <br /><br />Ubaka
Josh</h2>
</body>
</html>
This will display a tittle online voting system at the top of the web browser and on
the main page; Online Voting System by Ubaka Josh will be displayed in center
alignment. A form was designed to collect registration data from a user which
involves a user name and a password, which when entered and submitted, the
submit button sends the data to a web document and into the database to act upon
the data.
Professor L. Adele Jinadu, in his opinion said that there is a critical need for an
honest competent and non-partisan administrator to run elections. This is to
support the basic conditions for the conduct of free and fair elections as the report
of the electoral bureau stipulated (1987). Yet there was hardly an election that was
conducted in this country that has been rig free. This question is “what is the
nature of these malpractices: A lot of materials have been published concerning
this issue. (1991).
M. C. Andre, he said, several states have already attempted using online voting
systems for their state or local elections, which is rig free. The trials were done in
a small scale setting.
Furthermore, John Naughton in his article “Election of the future” quoted
Churchill as saying that democracy is in such a poor state that some suggest
financial incentives for voting as he famously observed is the worst system of
government except for all the others. For all the gratifying footage citizens
queuing interminably to cast their hard won votes. There is the reality of dreadful
turnouts and voter’s droopiness throughout the more “mature” democracies of the
west. He also enumerated that online voting system can completely eradicate the
denial of voting right, the long queuing and time wasted while processing the
result, the assault encountered during voting which has discouraged many from
voting. Because it is a web-based voting system, it allows voters to vote from their
various homes located at different geographical areas. Not only can they vote at
various locations, the online voting system is absolutely secured, because they are
protected by passwords and tamper-proof audit logs.
2.3 SUMMARY
The researcher cannot but have the same view with the scholars that our voting
system needs a total restructuring before effective election could be conducted in
this country.
CHAPTER THREE
SYSTEM ANALYSIS AND DESIGN
3.0 INTRODUCTION
In this chapter, the choice of methodology used in this project work, the analyses
of the existing system and among others are presented. It includes specific methods
which were used in order to achieve the objectives of the project, particular
requirements for implementation of the project and a brief explanation of why such
methods were used for implementing the proposed system, also included is a brief
description of the current system of voting.
UML diagrams can be divided into two categories. The first type includes six
diagram types representing structural information. The second includes the
remaining seven representing general types of behaviour. Structure diagrams are
used in documenting the architecture of software systems and are involved in the
system being modeled.
UML diagrams represent static and dynamic views of a system model. The static
view includes class diagrams and composite structure diagrams, which emphasize
static structure of systems using objects, attributes, operations and relations. The
dynamic view represents collaboration among objects and changes to internal
states of objects through sequence, activity and state machine diagrams.
Fig 3.1 UML use caseDiagram
Table 1: Account
Field Data type Size Attributes Description Null Default Extra
Uname Varchar 25 User name No None
Pwd Varchar 20 Password Yes Null
Table 2: Party
Field Data type Size Attributes Description Null Default Extra
party_name Varchar 20 Party name Yes NULL
Code varchar 20 Party code Yes NULL
Hq Varchar 20 Headquarter Yes NULL
Chairman varchar 20 Party chairman Yes NULL
Sec Varchar 20 Party secretary Yes NULL
Sn int 3 Serial number No none auto_incremen
t
Table 4: table_voters
Field Data type Size Attributes Description Null Default Extra
v_name varchar 20 Voters name Yes NULL
v_number varchar 20 Voter’s no Yes NULL
f_number varchar 20 Form number Yes NULL
Sex varchar 8 Gender Yes NULL
Address varchar 50 Voters address Yes NULL
Age varchar 5 Voter’s age Yes NULL
Ward varchar 20 Voter’s ward Yes NULL
Lga varchar 20 Local [Link] Yes NULL
Zone varchar 20 Voter’s zone Yes NULL
State varchar 20 Voter;s state Yes NULL
Occupation varchar 20 Occupation Yes NULL
state_id varchar 20 State id no Yes NULL
Sn int 3 Serial no No None auto_incremen
t
Table 5: Votes
Field Data type Size Attributes Description Null Default Extra
Party varchar 20 Party Yes NULL
Contestant Varchar 20 Contestant Yes NULL
Count Varchar 30 Count of votes No None
Voter’s name
Voter’s number
Form number
Sex
Address
Age
Ward
LGA
Zone
State
Occupation
State Id
SUBMIT CANCEL
Figure 2: Voters registration form.
After the registration is completed the voter will then visit the voting site where he
needs to make a choice of who to vote for by using keyboard or mouse to make
his/her selection. After making his/her choice, he/she will click the submit button
Log out
Candidate 1 Result
Candidate 2 Result
Candidate 3 Result
SYSTEM IMPLEMENTATION
4.0 INTRODUCTION
This chapter clearly explains the implementation and explanation of how the user
can navigate through the new developed system of voting in order to use it easily.
The system was developed as an interactive mechanism between the user at the
interface and the database using the web-browser. It was designed using notepad+
+. This tool enables the admin through a web browser to interact with the MYSQL
database to enter, edit, view and retrieve such data as the privileges granted. These
activities were achieved using PHP. HTML forms offer the best layout to enter
data, change and view the database. These forms were also kept as short and
simple as possible for easy public awareness on the use of the tool.
4.1.1 THE LOGIN FORM
This is where a new user/voter starts; the individual is required to provide a voters
card serial number. When this is provided, the system validates the user if the
entered information tallies with what is in the database. He/she is then logged in
This form can be accessed by the user (voters) and the administrator. This is
because the administrator may not really have the time to start registering all the
voters and also voters who may not have the chance to be registered by the admin
can register on their own at home. So the link is made available for the admin and
ordinary users.
Here, the components of the software and their various linkages are shown in a
block diagram
BEGIN
ENTER CREDENTIALS
DISPLAYS ADMIN PAGE
DISPLAY
CANDIDATES VOTER REPORT PARTY ACCESS VIEW SCORE
REGISTRATION GENERATION REGISTRATION CONRTOL BOARD
VOTE
ENTER VOTER’S
INFORMATION DISPLAY VOTER’S ENTER PARTY CREATES DISPLAY
& PARTY INFORMATION NEW USER VOTE
INFORMATION RESULT
SAVE VOTE TO
DATABASE SAVE RECORD
TO DATABASE
SAVE RECORD SAVE
TO DATABASE RECORD TO LOG OUT
INCREMENT DATABASE
Figure 3: A block diagram showing the components of the software and their various linkages.
make sure that all the syntax errors were eliminated in the software.
This includes the information requirements for users or voters as they register and
vote for a candidate of their choice. This page requests the user/voter to enter the
Figure 1: Screen shot of the input form requesting the user to enter the necessary information.
Once the voter provides this requirements and then click on the submit button, the
The output specification contains basic output information after all necessary
4.4 DOCUMENTATION
As said earlier, that this system was built with basic HTML codes, PHP, CSS and
future.
HTML: This is an acronym for Hyper Text Makeup Language; it is a language for
describing the web pages. Html form elements are elements that allow the user to
enter information (like text fields, text area fields, drop-down menus etc.) in a form
CSS: This is the acronym for cascading style sheets, these codes are used to style
html elements, when html codes are written and viewed on a web browser, it
doesn’t really appear in a beautiful format, so we used CSS to style the html codes.
PHP: Hypertext preprocessor is widely used scripting language that was originally
designed for web development, to produce dynamic web pages. These codes can
SQL data language. Different data types were used in this project. It was used
voting system. To execute the program, open notepad by clicking on the start
button on the task bar and then close program from the pop-up menu, select
Accessories and click on Notepad. Open the file from the CD drive and include a
HTML extension to the file name. Then click on the Internet explorer icon to view
the page.
STEPS
v. Click open
The application has the following menu commands for the admin:
1. Create Account: On clicking on this icon, it displays a form for the voter
to be registered.
2. Edit Count: Clicking on this button enables the admin to view the details
of the registered sub-admins and also view the details of the party’s
registered.
3. Register Parties: This menu enables the admin to register the different
5. View all voters: On clicking displays the list of all the people that
6. Count votes: this menu gives the results of the votes, the party that win
7. Insert Card number: This menu enables the admin to insert ID card
The application has just two menu commands for the user
1. Voter’s Register: On clicking on this icon, it displays a form for the voter to
2. Login: Here, the voter can now login to access the page to cast for his/her
vote.
5.0 SUMMARY
This Online Voting system will manage the Voter’s information by which voter
can login and use his voting rights. The system will incorporate all features of
voting system. It provides the tools for maintaining voter’s vote to every party and
maintained by the electoral commission in which all the names of voter with
5.1CONCLUSION
The main aspect behind online voting system is that it enabled us to bring out the
new ideas that were sustained within us for many days. This project offers the
voters to cast his/her easily through internet. Vote counting is also made easy by
this system since it’s just a matter of querying the database. Developing a good
system is critical to the success of the system to prevent system failures and to gain
wide acceptance as the best method available. A good online voting system
these characteristics as the foundation. These standards were made national. This
system will be an inexpensive, and less time consuming method once a system
implemented.
5.2 RECOMNEDATION
After my research and my finalization of this project, I highly recommend that the
online voting system serves to be the best to be put in use especially in the 21 st
century where human beings are embracing new technologies and where there is
malicious struggle for power by leaders all over the world. This struggle for power
has resulted in the use of all approaches by the leaders in power to remain in their
positions at whatever costs even if it means applying vote rigging to win elections.
With this system in place, a number of such problems shall be forgotten. Though
the system will be costly especially in terms of personal computer and equipment,
but I strongly believe that these costs will be offset if the new system is properly
implemented based on the further improvement and working towards 100% taking
into consideration the peculiar features of the Internet which is a valuable tool and
new technology to phase out some of the problems they go through during manual
voting.