请问这段代码 哪里有错误 帮个忙 谢谢呢 ~
<?phpecho$_POST['name']."<br/>";//echo$_POST['price']."<br/>";//echo$_POST['type']."<...
<?php
echo $_POST['name']."<br/>";
// echo $_POST['price']."<br/>";
// echo $_POST['type']."<br/>";
// echo $_POST['name']."<br/>";
echo $_POST['tel']."<br/>";
echo $_POST['email']."<br/>";
echo $_POST['QQ']."<br/>";
echo $_POST['sex']."<br/>";
echo $_POST['brandname']."<br/>";
echo $_POST['commoditybrand']."<br/>";
echo $_POST['productID']."<br/>";
echo $_POST['ordername']."<br/>";
echo $_POST['shopname']."<br/>";
echo $_POST['shopaddr']."<br/>";
echo $_POST['invoicenumber']."<br/>";
echo $_POST['purchasingdate']."<br/>";
$dingdanhao = date("Y-m-dH-i-s");
$dingdanhao = str_replace("-","",$dingdanhao);
$dingdanhao .= rand(1000,2000);
echo print $dingdanhao;
$name=$_POST['name'];
$tel=$_POST['tel'];
$email=$_POST['email'];
$QQ=$_POST['QQ'];
$sex=$_POST['sex'];
$brandname=$_POST['brandname'];
$commoditybrand=$_POST['commoditybrand'];
$productID=$_POST['productID'];
$ordername=$_POST['ordername'];
$shopname=$_POST['shopname'];
$shopaddr=$_POST['shopaddr'];
$invoicenumber=$_POST['invoicenumber'];
$purchasingdate=$_POST['purchasingdate'];
require_once("conn.php");
if(mysql_query("insert into name set name='$name',tel='$tel',email='$email',QQ='$QQ',sex='$sex',brandname='$brandname',commoditybrand='$commoditybrand',productID='$productID',ordername='$ordername',shopname='$shopname',shopaddr='$shopaddr',invoicenumber='$invoicenumber',purchasingdate='$purchasingdate'",$conn)){
echo "添加成功!<a href='testmysql.php'>查看数据库</a>";
}
else{
echo '添加失败!';
}
mysql_close($con);
?> 展开
echo $_POST['name']."<br/>";
// echo $_POST['price']."<br/>";
// echo $_POST['type']."<br/>";
// echo $_POST['name']."<br/>";
echo $_POST['tel']."<br/>";
echo $_POST['email']."<br/>";
echo $_POST['QQ']."<br/>";
echo $_POST['sex']."<br/>";
echo $_POST['brandname']."<br/>";
echo $_POST['commoditybrand']."<br/>";
echo $_POST['productID']."<br/>";
echo $_POST['ordername']."<br/>";
echo $_POST['shopname']."<br/>";
echo $_POST['shopaddr']."<br/>";
echo $_POST['invoicenumber']."<br/>";
echo $_POST['purchasingdate']."<br/>";
$dingdanhao = date("Y-m-dH-i-s");
$dingdanhao = str_replace("-","",$dingdanhao);
$dingdanhao .= rand(1000,2000);
echo print $dingdanhao;
$name=$_POST['name'];
$tel=$_POST['tel'];
$email=$_POST['email'];
$QQ=$_POST['QQ'];
$sex=$_POST['sex'];
$brandname=$_POST['brandname'];
$commoditybrand=$_POST['commoditybrand'];
$productID=$_POST['productID'];
$ordername=$_POST['ordername'];
$shopname=$_POST['shopname'];
$shopaddr=$_POST['shopaddr'];
$invoicenumber=$_POST['invoicenumber'];
$purchasingdate=$_POST['purchasingdate'];
require_once("conn.php");
if(mysql_query("insert into name set name='$name',tel='$tel',email='$email',QQ='$QQ',sex='$sex',brandname='$brandname',commoditybrand='$commoditybrand',productID='$productID',ordername='$ordername',shopname='$shopname',shopaddr='$shopaddr',invoicenumber='$invoicenumber',purchasingdate='$purchasingdate'",$conn)){
echo "添加成功!<a href='testmysql.php'>查看数据库</a>";
}
else{
echo '添加失败!';
}
mysql_close($con);
?> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询