Reusable ward-based voting website built with PHP and MariaDB/MySQL.
The public pages use clean HTML structure. All voting, registration and admin logic still runs on the PHP backend for security.
| Page | File | Purpose |
|---|---|---|
| Home | index.php |
Landing page |
| About | about.php |
How the system works |
| Contact | contact.php |
Contact form |
| Registration | registration.php |
Voter registration request |
| Voting | vote.php |
ID verification + cast vote |
| Admin Login | login.php |
Administrator sign-in |
Not anyone can become an admin.
setup.php (run once, then delete the file).admin-register.php only if the visitor knows the secret ADMIN_REGISTRATION_KEY stored in config.php.config.php to a long private value and share it only with authorised people.This prevents open public registration of administrators.
WardVoting folder into C:\xampp\htdocs\.database/schema.sql.http://localhost/WardVoting/setup.php and create the first ward + admin.setup.php immediately after.ADMIN_REGISTRATION_KEY in config.php.login.php and start adding voters / nominees.WardVoting/
├── index.php, about.php, contact.php
├── registration.php, vote.php
├── login.php, admin-register.php, logout.php, setup.php
├── config.php, functions.php, style.css, .htaccess
├── admin/
│ ├── dashboard.php
│ ├── voters.php
│ ├── requests.php
│ └── election.php
└── database/
└── schema.sql
password_hash)..htaccess.