PHP 添加不进数据库。。 怎么回事。
$varbiaoti=trim($_POST["biaoti"]);$varleixing=trim($_POST["leixing"]);$varjiage=trim(...
$varbiaoti=trim($_POST["biaoti"]);
$varleixing=trim($_POST["leixing"]);
$varjiage=trim($_POST["jiage"]);
$vardiqu=trim($_POST["diqu"]);
$varxinxi=trim($_POST["memo"]);
$shuyu=trim($_POST["shuyu"]);
$varname=trim($_POST["name"]);
$varemail=trim($_POST["email"]);
$vardianhua=trim($_POST["dianhua"]);
$varyanzheng=trim($_POST["t5"]);
$varriqi=date("Y-m-d");
$shuliang=$_POST["shuliang"];
$youxiaoqi=$_POST["youxiaoqi"]."天";
$shenhe=11;
$file_name1=$_POST["tupian"];
$tsql="insert into dingdan(varname,leibie1,leibie2,dizhi,dianhua,email,type,riqi,jiage,xinxi,biaoti,img,shuyu,shuliang,youxiaoqi,shenhe) values('$varname','$varselect','$varfenlei2','$vardiqu','$vardianhua','$varemail','$varleixing','$varriqi','$varjiage','$varxinxi','$varbiaoti','$file_name1','$shuyu','$shuliang','$youxiaoqi','$shenhe')";
mysql_query($tsql);
mysql_close();
这是添加的代码。。 数据库连接正常。代码没放上去!! 展开
$varleixing=trim($_POST["leixing"]);
$varjiage=trim($_POST["jiage"]);
$vardiqu=trim($_POST["diqu"]);
$varxinxi=trim($_POST["memo"]);
$shuyu=trim($_POST["shuyu"]);
$varname=trim($_POST["name"]);
$varemail=trim($_POST["email"]);
$vardianhua=trim($_POST["dianhua"]);
$varyanzheng=trim($_POST["t5"]);
$varriqi=date("Y-m-d");
$shuliang=$_POST["shuliang"];
$youxiaoqi=$_POST["youxiaoqi"]."天";
$shenhe=11;
$file_name1=$_POST["tupian"];
$tsql="insert into dingdan(varname,leibie1,leibie2,dizhi,dianhua,email,type,riqi,jiage,xinxi,biaoti,img,shuyu,shuliang,youxiaoqi,shenhe) values('$varname','$varselect','$varfenlei2','$vardiqu','$vardianhua','$varemail','$varleixing','$varriqi','$varjiage','$varxinxi','$varbiaoti','$file_name1','$shuyu','$shuliang','$youxiaoqi','$shenhe')";
mysql_query($tsql);
mysql_close();
这是添加的代码。。 数据库连接正常。代码没放上去!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询