prepare("UPDATE elections SET status = ? WHERE id = ?"); $stmt->execute([$status, $id]); audit_log("Updated election status to $status", 'elections', $id); header("Location: ../view_election.php?id=$id&success=1"); exit; } catch (Exception $e) { die($e->getMessage()); } }