From ba03547647537ed3a82ba9d751e26cb6becdab71 Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 4 Mar 2020 10:35:49 +0100 Subject: [PATCH] fix? --- threadr/boards/thread.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/threadr/boards/thread.php b/threadr/boards/thread.php index a857f89..14ac054 100644 --- a/threadr/boards/thread.php +++ b/threadr/boards/thread.php @@ -24,7 +24,8 @@ $navbar="boards"; if (!$error) { $statement = $pdo->prepare("SELECT * FROM boards WHERE id=$_GET['id']"); $statement->execute(); - echo $statement->fetchAll()[0]['name']"; + $result = $statement->fetchAll(); + echo $result[0]['name'] } if (!$result) { $error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];