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) {