时间:2021-07-01 10:21:17 帮助过:25人阅读
echo "姓名:".$_POST['name']."
";
// echo $_POST['price']."
";
// echo $_POST['type']."
";
// echo $_POST['name']."
";
echo "电话:". $_POST['tel']."
";
echo "电邮:".$_POST['email']."
";
echo "QQ:".$_POST['QQ']."
";
echo "地址:".$_POST['addr']."
";
echo "性别:".$_POST['sex']."
";
echo "商品名称:".$_POST['brandname']."
";
echo "商品品牌:".$_POST['commoditybrand']."
";
echo "商品编号:".$_POST['productID']."
";
echo "商品序号:".$_POST['ordername']."
";
echo "商铺名称:".$_POST['shopname']."
";
echo "商铺地址:".$_POST['shopaddr']."
";
echo "发票编号:".$_POST['invoicenumber']."
";
echo "购买日期:".$_POST['purchasingdate']."
";
$dingdanhao = date("Y-m-dH-i-s");
$dingdanhao = str_replace("-","",$dingdanhao);
$dingdanhao .= rand(1000,2000);
echo "保用编号:". $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',commodity
brand='$commoditybrand',productID='$productID',ordername='$ordername',shopname='$shopname',
shopaddr='$shopaddr',invoicenumber='$invoicenumber',purchasingdate='$purchasingdate'",
$conn)){
echo "添加成功!查看数据库";
}
else{
echo '添加失败!';
}
mysql_close($con);
?>