Do something
This commit is contained in:
18
lib/meme.php
Normal file
18
lib/meme.php
Normal 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 "";
|
||||
}
|
Reference in New Issue
Block a user