prepare("SELECT * FROM elections WHERE id = ?"); $stmt->execute([$id]); $election = $stmt->fetch(); if (!$election) { die("Election not found."); } $positions = $pdo->prepare("SELECT * FROM positions WHERE election_id = ? ORDER BY sort_order ASC"); $positions->execute([$id]); $positions = $positions->fetchAll(); $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Online Election System'; ?> <?= htmlspecialchars($election['title']) ?> | Manage

Status
Election Period
Total Participation
prepare("SELECT COUNT(DISTINCT voter_id) FROM votes WHERE election_id = ?"); $vStmt->execute([$id]); $votesCount = $vStmt->fetchColumn(); ?>
Votes Cast

Positions & Structure

prepare("SELECT COUNT(*) FROM candidates WHERE position_id = ?"); $cStmt->execute([$pos['id']]); $cCount = $cStmt->fetchColumn(); ?>
Position Name Max Votes Candidates Actions
No positions defined yet. Start by adding one.
Vote 1 ? 's' : '' ?>
Manage Candidates

Quick Stats

Total Candidates
prepare("SELECT COUNT(*) FROM candidates WHERE election_id = ?"); $canStmt->execute([$id]); $candidatesTotal = $canStmt->fetchColumn(); ?>
Voter Turnout

Need Help?

Manage your election structure by adding positions and assigning candidates to them. Once ready, you can launch the election.

View Reports