prepare("DELETE FROM participants WHERE id = :id"); $stmt->bindParam(':id', $participant_id, PDO::PARAM_INT); $stmt->execute(); if ($stmt->rowCount() > 0) { header('Location: participants.php?message=deleted'); } else { header('Location: participants.php?error=not_found'); } exit; } catch (PDOException $e) { // In a real app, you'd log this error, not expose it header('Location: participants.php?error=db_error'); exit; }