This commit is contained in:
Bruno Rybársky 2024-04-25 23:21:05 +02:00
parent b6b1fe7b0e
commit 5fae9e9747

@ -11,7 +11,7 @@ function addMeme(string $title, string $memeText, int $imageID): array
echo !empty($title) ? "a" : "b";
echo !empty($memeText) ? "a" : "b";
echo !empty($imageID) ? "a" : "b";
echo $imageID > 0 ? "a" : "b";
echo $imageID;
if (isLoggedIn() && fileExists($imageID, false) && !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);