forked from Adleraci/adlerka.top
MEME
This commit is contained in:
parent
cf7368ba4f
commit
b6b1fe7b0e
@ -12,7 +12,7 @@ function addMeme(string $title, string $memeText, int $imageID): array
|
|||||||
echo !empty($memeText) ? "a" : "b";
|
echo !empty($memeText) ? "a" : "b";
|
||||||
echo !empty($imageID) ? "a" : "b";
|
echo !empty($imageID) ? "a" : "b";
|
||||||
echo $imageID > 0 ? "a" : "b";
|
echo $imageID > 0 ? "a" : "b";
|
||||||
if (isLoggedIn() && fileExists($imageID) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) {
|
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 = $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);
|
||||||
if($stmtMemeAdd->execute() && $stmtMemeAdd->affected_rows > 0) {
|
if($stmtMemeAdd->execute() && $stmtMemeAdd->affected_rows > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user