A modern, secure, and user-friendly web-based voting system built with PHP and MySQL. The system features a streamlined voter registration process accessible from the login page, where users can enter their first name, last name, password, and an optional profile photo. Clicking "Generate Voter ID & Register" automatically creates a unique Voter ID, allowing users to log in using their credentials. Once authenticated, users enter the "2026 ELECTION PORTAL," which consists of two main steps: selecting nominees from registered voters (with options to accept or decline, or bypass if candidates already exist) and casting final votes with a maximum selection cap of at least 3. Additionally, the admin dashboard, accessed via /admin/home.php, provides comprehensive management tools including real-time statistics cards, live tally sections for top standings and nominees, sidebar navigation for reports, management, and settings, as well as profile controls and print functions.
- XAMPP (Apache + MySQL + PHP v7.4 or higher recommended)
- Any modern Web Browser (Chrome, Firefox, Edge, Safari)
index.php— Voter login and starting portaladmin/— Administrative dashboard and management pagesincludes/— Shared frontend PHP components and templatesadmin/includes/— Shared admin-specific PHP includesdb/votesystem.sql— Database schema and default seed data
- Install XAMPP on your local machine if you haven't already.
- Copy the Project Folder into your XAMPP
htdocsdirectory:- Example Path:
C:\xampp\htdocs\voting
- Example Path:
- Start Services: Open the XAMPP Control Panel and start both Apache and MySQL.
- Access phpMyAdmin: Open your browser and go to
http://localhost/phpmyadmin. - Create Database: Create a new database named
votesystem. - Import SQL File:
- Click on the
votesystemdatabase in the left sidebar. - Navigate to the Import tab.
- Select
db/votesystem.sqlfrom your project directory. - Click Go at the bottom to execute the import.
- Click on the
- Launch Voter Portal: Open your browser and navigate to:
http://localhost/voting/
- Launch Admin Panel: Navigate to:
http://localhost/voting/admin/
- Username: angel
- Password: 1234
- Database Connection Error: Verify that the MySQL service is running in XAMPP and that a database named
votesystemsuccessfully exists in phpMyAdmin. - Pages Not Loading / 404 Errors: Double-check that your project folder inside
htdocsis strictly namedvotingto match your local URL structure. - Login Issues: If authentication fails, ensure your database credentials match or reset the password hash directly inside the database table.