From e7949e4bfb4331252bfd687551497c1e8cc03fa5 Mon Sep 17 00:00:00 2001 From: Jakob Date: Sun, 8 Mar 2020 15:18:55 +0100 Subject: [PATCH 1/2] not working --- threadr/board/board.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/threadr/board/board.php b/threadr/board/board.php index 930098f..a8fd31d 100644 --- a/threadr/board/board.php +++ b/threadr/board/board.php @@ -7,17 +7,17 @@ if (!$error) { $statement->execute(); foreach($statement->fetchAll() as $ROW) { echo "
" - echo "

$ROW[id]

" - echo "
" - echo "
" - echo "
" - echo "

$ROW[user_id]

" - echo "
" - echo "
" - echo "
" - echo "

$ROW[content]

" - echo "
" - echo "
" + echo "

$ROW[id]

" + echo "
" + echo "
" + echo "
" + echo "

$ROW[user_id]

" + echo "
" + echo "
" + echo "
" + echo "

$ROW[content]

" + echo "
" + echo "
" echo "
" } } From f64f00685a0d813e54877c1afb98b9a16ab9e5d7 Mon Sep 17 00:00:00 2001 From: Jakob Date: Sun, 8 Mar 2020 15:20:06 +0100 Subject: [PATCH 2/2] maybe i fixed it --- threadr/board/board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/threadr/board/board.php b/threadr/board/board.php index a8fd31d..62b8a4c 100644 --- a/threadr/board/board.php +++ b/threadr/board/board.php @@ -3,7 +3,7 @@ $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 = $pdo->prepare("SELECT * FROM posts WHERE board_id='$id' ORDER BY post_time asc"); $statement->execute(); foreach($statement->fetchAll() as $ROW) { echo "
"