if($_POST['send'] == "发布内容"){
ini_set("date.timezone","Asia/Hong_Kong");
$sort = $_POST['sort'] ;
$title = $_POST['title'] ;
$top = $_POST['top'] ;
$rmp = $_POST['rmp'] ;
$pic = $_POST['pic'] ;
$bold = $_POST['bold'] ;
$color = $_POST['color'] ;
$tag = $_POST['tag'] ;
$info = $_POST['info'] ;
$content = $_POST['content'] ;
$keyword = $_POST['keyword'] ;
$name = $_POST['name'] ;
$time = date("Y-m-d H:i:s");
$addsql = "insert into cms_article(CMS_Sort,CMS_Title,CMS_Top,CMS_Rmp,CMS_Pic,CMS_Bold,CMS_Color,CMS_Tag,CMS_Keyword,CMS_Name,CMS_Info,CMS_Content,CMS_Date) values (?,?,?,?,?,?,?,?,?,?,?,?,?)" ;
$stmt = $dbn ->prepare($addsql) ;
$stmt -> bindParam(1,$sort) ;
$stmt -> bindParam(2,$title) ;
$stmt -> bindParam(3,$top) ;
$stmt -> bindParam(4,$rmp) ;
$stmt -> bindParam(5,$pic) ;
$stmt -> bindParam(6,$bold) ;
$stmt -> bindParam(7,$color) ;
$stmt -> bindParam(8,$tag) ;
$stmt -> bindParam(9,$keyword) ;
$stmt -> bindParam(10,$name) ;
$stmt -> bindParam(11,$info) ;
$stmt -> bindParam(12,$content) ;
$stmt -> bindParam(13,$time) ;
$stmt ->execute() ;
echo $content ;
其他值插入都没问题,唯有$content插入不进去,只插入进去一个<p> 但是echo $content ;可以打印出插入的值,数据库字段设置为varchar(250)或者text都不行
ini_set("date.timezone","Asia/Hong_Kong");
$sort = $_POST['sort'] ;
$title = $_POST['title'] ;
$top = $_POST['top'] ;
$rmp = $_POST['rmp'] ;
$pic = $_POST['pic'] ;
$bold = $_POST['bold'] ;
$color = $_POST['color'] ;
$tag = $_POST['tag'] ;
$info = $_POST['info'] ;
$content = $_POST['content'] ;
$keyword = $_POST['keyword'] ;
$name = $_POST['name'] ;
$time = date("Y-m-d H:i:s");
$addsql = "insert into cms_article(CMS_Sort,CMS_Title,CMS_Top,CMS_Rmp,CMS_Pic,CMS_Bold,CMS_Color,CMS_Tag,CMS_Keyword,CMS_Name,CMS_Info,CMS_Content,CMS_Date) values (?,?,?,?,?,?,?,?,?,?,?,?,?)" ;
$stmt = $dbn ->prepare($addsql) ;
$stmt -> bindParam(1,$sort) ;
$stmt -> bindParam(2,$title) ;
$stmt -> bindParam(3,$top) ;
$stmt -> bindParam(4,$rmp) ;
$stmt -> bindParam(5,$pic) ;
$stmt -> bindParam(6,$bold) ;
$stmt -> bindParam(7,$color) ;
$stmt -> bindParam(8,$tag) ;
$stmt -> bindParam(9,$keyword) ;
$stmt -> bindParam(10,$name) ;
$stmt -> bindParam(11,$info) ;
$stmt -> bindParam(12,$content) ;
$stmt -> bindParam(13,$time) ;
$stmt ->execute() ;
echo $content ;
其他值插入都没问题,唯有$content插入不进去,只插入进去一个<p> 但是echo $content ;可以打印出插入的值,数据库字段设置为varchar(250)或者text都不行
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货