📄 form_write_post.php
字号:
<?php
require_once 'require.php';
$name = $_POST['name'];
$sex = $_POST['sex'];
$mail = $_POST['mail'];
$title = $_POST['title'];
$text = $_POST['text'];
try
{
if ($title == '')
{
throw new Exception('留言标题不能为空 <a href="form_write.php">返回</a>');
}
if ($text == '')
{
throw new Exception('留言内容不能为空 <a href="form_write.php">返回</a>');
}
}
catch (Exception $e)
{
html_header('填写新留言');
html_info('错误提示','on',$e->getMessage(),'off','1','');
html_footer();
exit;
}
if (add_gbook($title,$name,$mail,$sex,$text))
{
html_header('发表新留言成功');
html_info('发表新留言成功','on','发表新留言成功 <a href="default.php">返回</a>','off','1','');
html_footer();
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -