This commit is contained in:
Bruno Rybársky 2024-04-25 22:55:00 +02:00
parent 99d4f076f9
commit 7da94c06d4

@ -10,8 +10,10 @@ function addMeme(string $title, string $memeText, int $imageID): array
$stmtMemeAdd = $mysqli->prepare('INSERT INTO Memes (AuthorID, Title, TextContent, FileID) VALUES (?, ?, ?, ?)'); $stmtMemeAdd = $mysqli->prepare('INSERT INTO Memes (AuthorID, Title, TextContent, FileID) VALUES (?, ?, ?, ?)');
$stmtMemeAdd->bind_param('issi', $_SESSION['ID'], htmlspecialchars($title), htmlspecialchars($memeText), $imageID); $stmtMemeAdd->bind_param('issi', $_SESSION['ID'], htmlspecialchars($title), htmlspecialchars($memeText), $imageID);
$stmtMemeAdd->execute(); $stmtMemeAdd->execute();
if($stmtMemeAdd->affected_rows > 0) {
$output["Status"] = "Success"; $output["Status"] = "Success";
} }
}
return $output; return $output;
} }