From e7f177e4ccf027ec9a060ef1a8d64b410cb9459a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 25 Apr 2024 23:19:30 +0200 Subject: [PATCH] MEME --- lib/meme.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/meme.php b/lib/meme.php index e688c8d..71ecbe8 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -7,13 +7,13 @@ function addMeme(string $title, string $memeText, int $imageID): array global $mysqli; $output = ["Status" => "Fail"]; echo "B"; + echo isLoggedIn(); + echo fileExists($imageID); + echo !empty($title); + echo !empty($memeText); + echo !empty($imageID); + echo $imageID > 0; if (isLoggedIn() && fileExists($imageID) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) { - 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) {