MEME
This commit is contained in:
parent
3d1eb77e2f
commit
c159b0b749
@ -8,7 +8,12 @@ function addMeme(string $title, string $memeText, int $imageID): array
|
||||
$output = ["Status" => "Fail"];
|
||||
echo "B";
|
||||
if (isLoggedIn() && fileExists($imageID) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) {
|
||||
echo "A";
|
||||
echo isLoggedIn();
|
||||
echo fileExists($imageID);
|
||||
echo !empty($title);
|
||||
echo !empty($memeText);
|
||||
echo !empty($imageID);
|
||||
echo $imageID > 0;
|
||||
$stmtMemeAdd = $mysqli->prepare('INSERT INTO Memes (AuthorID, Title, TextContent, FileID) VALUES (?, ?, ?, ?)');
|
||||
$stmtMemeAdd->bind_param('issi', $_SESSION['ID'], htmlspecialchars($title), htmlspecialchars($memeText), $imageID);
|
||||
if($stmtMemeAdd->execute() && $stmtMemeAdd->affected_rows > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user