Home >Backend Development >PHP Tutorial >大家来看这段代码,如何插不进数据库
大家来看这段代码,怎么插不进数据库
include("db.php");
if(!empty($_POST['sub'])){
$title=$_POST['title'];
$con=$_POST['non'];
$sql="insert into `test` (`id`,`title`,`non`,`date`) VALUES('null','$title','$con',now())";
mysql_query($sql);
echo "插入成功";
}
?>
$sql="insert into `test` (`title`,`non`,`date`) VALUES('$title','$con', now())";<div class="clear"> </div>