forked from Adleraci/adlerka.top
MEME
This commit is contained in:
parent
f824b0c236
commit
16716a9b18
@ -9,8 +9,7 @@ function addMeme(string $title, string $memeText, int $imageID): array
|
|||||||
if (isLoggedIn() && fileExists($imageID) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) {
|
if (isLoggedIn() && fileExists($imageID) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) {
|
||||||
$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();
|
if($stmtMemeAdd->execute() && $stmtMemeAdd->affected_rows > 0) {
|
||||||
if($stmtMemeAdd->affected_rows > 0) {
|
|
||||||
$output["Status"] = "Success";
|
$output["Status"] = "Success";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user