$id = $_GET['id']; $stmt = $pdo->prepare("SELECT * FROM products WHERE id=?"); $stmt->execute([$id]); $product = $stmt->fetch();