if($_POST['user']=''){echo "user cannot be null!";}elseif($_POST['title']=''){echo "title cannot be null!";}elseif($_POST['content']=''){echo "content cannot be null!";}else{include('conn.php');$add_post = "insert into message (user, title, content, lastdate) " ."values ('$_POST[user]', '$_POST[title]', '$_POST[content]', now())";mysql_query($add_post);echo "success!";}结果是不论我是否输入user,title,content都会执行最后的else,而且添加数据库中得内容都为空。是if else语句的问题吗?同学...你总得说下是什么问题吧.......汗
添加回答
举报
0/150
提交
取消