Promo

setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); exit; } $query = isset($_GET['query']) ? $_GET['query'] : ''; if ($query) { $stmt = $pdo->prepare('SELECT title, link, description FROM search_results WHERE title LIKE :query OR description LIKE :query'); $stmt->execute(['query' => '%' . $query . '%']); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); } else { $results = []; } ?>

Результаты поиска по запросу ""