From 40e6c4a18300d6ba7d53dafedf75860901563d5e Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Tue, 7 Sep 2021 05:53:04 +0200 Subject: [PATCH] only scroll to the end when necessary --- threadr/board/index.php | 2 +- threadr/board/post.php | 6 ++++-- threadr/board/submit.php | 8 ++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/threadr/board/index.php b/threadr/board/index.php index a6fa23d..3506bf7 100644 --- a/threadr/board/index.php +++ b/threadr/board/index.php @@ -22,7 +22,7 @@ $id=$_GET['id']; } ?> - + %NAVBAR%
diff --git a/threadr/board/post.php b/threadr/board/post.php index ba4f0e9..ef7d19f 100644 --- a/threadr/board/post.php +++ b/threadr/board/post.php @@ -1,8 +1,10 @@ "; if (isset($_GET['reply_to'])) { - echo "
"; + echo "
"; } else { - echo "
"; + echo "
"; } + echo "
"; ?> diff --git a/threadr/board/submit.php b/threadr/board/submit.php index 81ff7df..1677015 100644 --- a/threadr/board/submit.php +++ b/threadr/board/submit.php @@ -7,8 +7,10 @@ if (isset($_GET['reply_to'])) { $reply_to = -1; } +echo "
"; + if ($_POST['title']==="" || $_POST['content']==="") { - echo "

Please fill out both the title field and content box.

"; + echo "

Please fill out both the title field and content box.

"; } else { @@ -22,6 +24,8 @@ else { $error_message = "

Error: SQL error.

" . $statement->queryString . "
" . $statement->errorInfo()[2] . "
"; } - echo "

Post submitted.

"; + echo "

Post submitted.

"; } + +echo "
"; ?>