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['description']) ?>
No positions defined yet.
| Position Name | Max Votes | Candidates | Actions |
|---|---|---|---|
| = htmlspecialchars($pos['name']) ?> | = $pos['max_votes'] ?> | = $cCount ?> | Candidates |