adlerka.space/lib/meme.php

18 lines
458 B
PHP
Raw Normal View History

2024-04-11 10:36:40 +02:00
<?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 "";
}