怎么樣才能不插入空數(shù)據(jù)?
if(!(isset($_POST['title'])&&(!empty($_POST['title'])))){
echo "<script>alert('標(biāo)題不能為空');window.location.href='article.add.php'</script>";
}else{
echo "<script>alert('標(biāo)題為空');window.location.href='article.add.php'</script>";
}
2018-05-29
填寫的的字段,現(xiàn)在都是交給前端來(lái)檢驗(yàn),后端處理數(shù)據(jù)