Onlinevoting System Project In Php And Mysql Source Code Github Link Jun 2026
The core voting logic is implemented in vote.php . When a user selects a candidate and submits the form, the PHP script:
| Feature | Description | |---------|-------------| | | Password hashing (bcrypt), session-based authentication | | Unique Voter ID | Each voter gets a system-generated ID + email verification | | One Vote Per Election | Database check prevents multiple votes from same user | | Real-Time Vote Count | Votes update instantly using PHP and MySQL queries | | Election Timer | Admin can set start & end time; voting auto-locks after deadline | | Result Declaration | Admin triggers result; system shows winner with vote share | | SQL Injection Prevention | Prepared statements and mysqli_real_escape_string | | XSS Protection | htmlspecialchars() on all output | The core voting logic is implemented in vote
| Column | Type | Description | | :--- | :--- | :--- | | id | INT(11) AUTO_INCREMENT | Primary Key | | fullname | VARCHAR(100) | Voter's full name | | email | VARCHAR(100) | Unique login credential | | password | VARCHAR(255) | Hashed using password_hash() | | voter_id_card | VARCHAR(50) | Unique voter number | | is_approved | TINYINT(1) | 0 = Pending, 1 = Approved | | has_voted | TINYINT(1) | 0 = No, 1 = Yes | 1 = Yes |