1024) { getOut($postType,$postId); } if (is_uploaded_file($_FILES['file']['tmp_name'])) { $fid = bin2hex(random_bytes(16)); move_uploaded_file($_FILES['file']['tmp_name'], $_SERVER["DOCUMENT_ROOT"] . '/../docs/pic/' . $fid . '.png'); $postie .= "\nhttps://" . $_SERVER['HTTP_HOST'] . '/pic/' . $fid . '.png'; } $stmt = $db->prepare("INSERT INTO main.comment (username, targetType, targetId, date, content, id) VALUES (?,?,?,?,?,?)"); $stmt->execute([$username,$postType,$postId,microtime(true) - $ref,$postie,bin2hex(random_bytes(16))]); getOut($postType,$postId); } post_handler(); page_header(); ?>