可以修改代码,添加些判断:
复制代码 代码如下: if(empty($_POST[‘name’])){ echo “俗话说的好,雁过留声人过留名”; }
elseif(empty($_POST[‘comment’])){ echo “矮油,多说几句吧~”; } else{ $sql = “INSERT INTO myblog_comments(blog_id, dateposted, name, comment) VALUES(” . $validentry . “, NOW(), ‘” . $_POST[‘name’] . “‘, ‘” . $_POST[‘commen
1