From c2d4290212702ebe3d091ba551ae111d1b49c7c4 Mon Sep 17 00:00:00 2001 From: Jakob Date: Sun, 8 Mar 2020 15:22:08 +0100 Subject: [PATCH] nope --- threadr/board/board.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/threadr/board/board.php b/threadr/board/board.php index 62b8a4c..3fc876c 100644 --- a/threadr/board/board.php +++ b/threadr/board/board.php @@ -3,8 +3,8 @@ $pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w $error = false; $error_message = ""; if (!$error) { - $statement = $pdo->prepare("SELECT * FROM posts WHERE board_id='$id' ORDER BY post_time asc"); - $statement->execute(); + $statement = $pdo->prepare("SELECT * FROM posts WHERE board_id=:id ORDER BY post_time asc"); + $statement->execute(array("id"=>$id)); foreach($statement->fetchAll() as $ROW) { echo "
" echo "

$ROW[id]

"