Do something

This commit is contained in:
2024-04-11 10:36:40 +02:00
parent 154fc4103f
commit 277232bdd1
5 changed files with 89 additions and 13 deletions

18
lib/meme.php Normal file
View File

@@ -0,0 +1,18 @@
<?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 "";
}