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