forked from Adleraci/adlerka.top
18 lines
458 B
PHP
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 "";
|
||
|
}
|