From afa0648b2d556530d2893fd0ecd93d0a79ebf515 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Mon, 11 Mar 2024 15:27:59 +0000 Subject: [PATCH] Update file editpage.php --- html/editpage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/editpage.php b/html/editpage.php index 34fded9f..496cd5d4 100644 --- a/html/editpage.php +++ b/html/editpage.php @@ -170,7 +170,7 @@ if(isset($fichier)) { $condition = ""; if(isset($_GET['search'])) { $search = "%" . htmlspecialchars($_GET['search']) . "%"; - $condition = "AND (titre LIKE " . $search . " OR ID LIKE " . $search . ") "; + $condition = "AND (titre LIKE '" . $search . "' OR ID LIKE '" . $search . "') "; } $req = $bdd->prepare("SELECT ID, titre, date FROM articles WHERE classification <= :accreditation " . $condition . "ORDER BY date DESC LIMIT 10"); $req->bindParam(":accreditation", $_SESSION['accreditation']);