Complete Automated Voting System Using PHP Free Source Code


This is a complete Automated Voting System using PHP. This system can be used both online and offline basis the system is pack with many features. The main purpose of this project is to provide the school an automated or online platform to conduct their election or voting system. This will help to easily calculate the candidates' votes and easy to retrieve the list of winners in each position without hassle.


This Automated Voting System project was developed originally in an old version of PHP but now was updated to run properly to the latest PHP version such as PHP 7 or 8. The source code was built or written using PHP, HTML, CSS, Javascript (jQuery), and some other plugins/libraries. The system has 2 types of users which are the Admin and the Students/Voters. The Admin is in charge of managing and populating all the lists in the database such as the list of positions and candidates. He/She is also in charge of adding the student IDNumber for the success of each student/voters registration process. The Student/Admin can only vote once and his/her system access will be automatically closed after submitting his/her votes. The system is easy to use and free to download on this website. Feel Free to download and modify the source code the way you wanted to meet your requirements.


Admin Side

  • Login/Logout
  • Manage Position List
  • Manage Candidates List
  • Manage Parties
  • Manage Course
  • Manage Voters
  • Manage Student Information
  • List Winners
  • Print the List of Winners
  • Manage Admin Accounts
  • Backup and Restore Database


  • Login/Logout
  • Registration
  • Vote
  • Review Ballot
  • Submit Vote
  • Retrieve Password

Other Information

  • Security
    • Each Student can register only once using their ID Number
    • Each Student Can vote only once
  • Categorize display of position by tabs.
  • Graphical display of election results.
  • Dynamically add, edit and delete position, course, student details, and candidates.
  • Print Election results.
  • Count the total number of students who voted and not voted yet.
  • Limit the number of senators to be a vote.
  • Secure Query Using PDO Query.

How to Run


  • Download and Install any local web server such as XAMPP/WAMP.
  • Download the provided source code zip file. (download button is located below)


  1. Open your XAMPP/WAMP's Control Panel and start the Apache and MySQL.
  2. Extract the downloaded source code zip file.
  3. If you are using XAMPP, copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory. And If you are using WAMP, paste it into the "www" directory.
  4. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  5. Create a new database naming onlinevoting.
  6. Import the provided SQL file. The file is known as onlinevoting.sql located inside the extracted source code folder.
  7. Browse the Automated Voting System in a browser. i.e. http://localhost/automatedvoting.

Admin Access Information

ID Number: admin
Password: admin


Note: Add Student ID Number First in the Admin Side before registering a voter's account.

That's it! I hope this Automated Voting System in PHP  will help you with what you are looking for and you'll find something useful for your future PHP Projects.

Happy Coding :)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted bytayme (not verified)on Mon, 07/21/2014 - 21:58

please i couldn't log in as a student...and its also not showing any error
Submitted bychixka (not verified)on Mon, 11/10/2014 - 16:43

hi to the author. i would like to ask help because the student id no. and password can't recognize yet there's no error appearing. thank you in advance.

Submitted byAnisur Rahman (not verified)on Sun, 11/06/2022 - 12:50

In reply to by chixka (not verified)

AND status='$stat' remove this condition from login query ,should work
Submitted byHelpPlease (not verified)on Tue, 11/25/2014 - 09:14

same situation in me i can't login it... how to fixed it? please need ur help
Submitted bykamolee (not verified)on Fri, 07/03/2015 - 10:28

Hello geraldine,, Can I copy your design , I will put credit on it
Submitted byfestuslangat (not verified)on Mon, 05/09/2016 - 17:16

Hi Geraldine, I would like to use your code in my assignment,With honour and great respect Could you kindly help me with the sources code which has opening and closing time of the polling. Please?. I will really appreciate if you can send to my email [email protected] . Thank you

Add new comment