From 7a74b06fab19ccd0f6527b297eb4d91a36336848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 25 Apr 2024 23:17:57 +0200 Subject: [PATCH] MEME --- lib/meme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/meme.php b/lib/meme.php index bd08e48..7f9098b 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -9,11 +9,11 @@ function addMeme(string $title, string $memeText, int $imageID): array if (isLoggedIn() && fileExists($imageID) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) { $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"; $output["Error"] = $stmtMemeAdd->error; - echo "Hai"; } } return $output;