$post['id'],
'author' => trim($_POST['author'] ?? ''),
'email' => trim($_POST['email'] ?? ''),
'url' => trim($_POST['url'] ?? ''),
'content' => trim($_POST['content'] ?? '')
];
if (empty($data['author']) || empty($data['content'])) {
$comment_message = '
';
} else {
if (create_comment($data)) {
$comment_message = '';
$data = ['post_id' => $post['id'], 'author' => '', 'email' => '', 'url' => '', 'content' => ''];
} else {
$comment_message = '';
}
}
} else {
$data = ['post_id' => $post['id'], 'author' => '', 'email' => '', 'url' => '', 'content' => ''];
}
include __DIR__ . '/header.php';
?>
暂无评论,来说两句吧~