prepare("SELECT p.*, e.title as election_title, e.id as election_id FROM positions p JOIN elections e ON p.election_id = e.id WHERE p.id = ?"); $pStmt->execute([$position_id]); $position = $pStmt->fetch(); if (!$position) die("Position not found"); $candidates = $pdo->prepare("SELECT c.*, u.name, u.student_id FROM candidates c JOIN users u ON c.user_id = u.id WHERE c.position_id = ?"); $candidates->execute([$position_id]); $candidates = $candidates->fetchAll(); // Get all users who could be candidates (could be improved with search) $users = $pdo->query("SELECT id, name, student_id FROM users WHERE role = 'Voter' LIMIT 100")->fetchAll(); ?> Manage Candidates | <?= htmlspecialchars($position['name']) ?>

Candidates for

Back to Election

Add New Candidate

Registered Candidates

Student Info Party Affiliation Status Actions
No candidates have been registered for this position yet.