From 7de4ecac1e16e16ff5e458179ab4e93a317b5d35 Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 4 Mar 2020 10:44:21 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9Ethreadr/boards/thread.php=E2=80=9C=20?= =?UTF-8?q?=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- threadr/boards/thread.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/threadr/boards/thread.php b/threadr/boards/thread.php index 7fabf26..5572294 100644 --- a/threadr/boards/thread.php +++ b/threadr/boards/thread.php @@ -22,9 +22,9 @@ $navbar="boards"; $error = false; $error_message = ""; if (!$error) { - $statement = $pdo->prepare("SELECT * FROM boards WHERE id=$_GET['id']"); - $statement->execute(); - $result = $statement->fetchAll(); + $statement = $pdo->prepare("SELECT * FROM boards WHERE id=:id"); + $statement->execute(array("id"=>$_GET['id'])); + $result = $statement->fetch(); echo $result; } if (!$result) {