stylehub/lib/meme.php
2024-04-11 10:36:40 +02:00

18 lines
458 B
PHP

<?php
function addMeme(string $memeText, int $imageID): bool
{
global $mysqli;
if(fileExists($imageID)){
$stmtMemeAdd = $mysqli->prepare('INSERT INTO Memes (AuthorID, TextContent, FileID) VALUES (?, ?, ?)');
$stmtMemeAdd->bind_param('isi', $_SESSION['ID'], htmlspecialchars($memeText), $imageID);
$stmtMemeAdd->execute();
return true;
}
return false;
}
function renderMemeGallery() :string
{
return "";
}