diff --git a/lib/meme.php b/lib/meme.php index 71ecbe8..9323a46 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -6,13 +6,12 @@ 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; + echo isLoggedIn() ? "a" : "b"; + echo fileExists($imageID) ? "a" : "b"; + echo !empty($title) ? "a" : "b"; + echo !empty($memeText) ? "a" : "b"; + echo !empty($imageID) ? "a" : "b"; + echo $imageID > 0 ? "a" : "b"; 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);