This commit is contained in:
biglyderv 2024-11-30 17:20:46 -05:00
parent e02816e81e
commit 0a7e99becd

View file

@ -10,9 +10,19 @@
global $db;
if (!$username) return;
if (!array_key_exists('post',$_POST)) return;
$postie = $_POST['post'];
if (strlen($postie) < 1 || strlen($postie) > 1024) {
return 'Post is too long or short.';
}
$stmt = $db->prepare("INSERT INTO main.comment (username, targetType, targetId, date, content, id) VALUES (?,?,?,?,?,?)");
$stmt->execute([$username,"root","root",microtime(true) - $ref,$postie,bin2hex(random_bytes(16))]);
header("Location: " . $_SERVER["REQUEST_URI"]);
die();
}
page_header();