A simple PHP voting site for the Minibikefest bike show.
| File | Purpose |
|---|---|
index.php |
Public voting page |
admin.php |
Admin dashboard |
config.php |
DB credentials & admin secret |
contestants.md |
List of contestants (one # Title per line) |
- Upload all files to your PHP host.
- Edit
config.php:- Set
DB_PASSto your database password. - Set
ADMIN_SECRETto a long, random string you'll keep private.
- Set
- Edit
contestants.mdwith the actual bike names (one# Nameheading per line). - Visit
index.php— tables are created automatically on first load.
Edit contestants.md. New entries are picked up automatically.
After editing, click Sync Contestants from MD in the admin panel to ensure the DB is up to date.
Access: admin.php?secret=YOUR_ADMIN_SECRET
- Toggle voting open/closed — controls whether the public can cast votes.
- Sync Contestants — re-reads
contestants.mdand inserts missing entries. - Delete All Votes — wipe test votes before the real event starts.
- Results table — live vote counts with percentages.
- Vote log — last 100 votes with IP address and timestamp.
- The contestant list is shuffled randomly for every visitor.
- Voting requires no account or email — completely anonymous.
- A cookie is set on vote to prevent double voting from the same browser.
- The voter's IP is stored for abuse tracking only.
- Results are hidden until after the visitor votes (or voting is closed).
- Host:
mariadb.in-berlin.de:3306 - Database:
35services_minibikefest - Tables are created automatically by
initDB()on every page load.
- PHP 8.0+ with PDO and
pdo_mysqlextension - MariaDB / MySQL 5.7+