From c159b0b7498adc473a7bc4ea3d57f89aee03843c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 25 Apr 2024 23:19:11 +0200 Subject: [PATCH] MEME --- lib/meme.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/meme.php b/lib/meme.php index d4b1acc..e688c8d 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -8,7 +8,12 @@ function addMeme(string $title, string $memeText, int $imageID): array $output = ["Status" => "Fail"]; echo "B"; if (isLoggedIn() && fileExists($imageID) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) { - echo "A"; + echo isLoggedIn(); + echo fileExists($imageID); + echo !empty($title); + echo !empty($memeText); + echo !empty($imageID); + echo $imageID > 0; $stmtMemeAdd = $mysqli->prepare('INSERT INTO Memes (AuthorID, Title, TextContent, FileID) VALUES (?, ?, ?, ?)'); $stmtMemeAdd->bind_param('issi', $_SESSION['ID'], htmlspecialchars($title), htmlspecialchars($memeText), $imageID); if($stmtMemeAdd->execute() && $stmtMemeAdd->affected_rows > 0) {