prepare('DELETE FROM users WHERE id = ?'); $stmt->execute([$user_id]); header("Location: users.php?success=user_deleted"); exit; } catch (PDOException $e) { // In a real app, log this error. header("Location: users.php?error=db_error"); exit; }