怎么样才能不插入空数据?
if(!(isset($_POST['title'])&&(!empty($_POST['title'])))){
echo "<script>alert('标题不能为空');window.location.href='article.add.php'</script>";
}else{
echo "<script>alert('标题为空');window.location.href='article.add.php'</script>";
}
if(!(isset($_POST['title'])&&(!empty($_POST['title'])))){
echo "<script>alert('标题不能为空');window.location.href='article.add.php'</script>";
}else{
echo "<script>alert('标题为空');window.location.href='article.add.php'</script>";
}
2018-05-23
举报