prepare("INSERT INTO positions (id, election_id, name, type, max_votes) VALUES (?, ?, ?, ?, 1)"); $stmt->execute([$id, $election_id, $name, $type]); audit_log('Added position', 'positions', $id); header("Location: ../candidate_management.php?success=1"); exit; } catch (Exception $e) { die($e->getMessage()); } }