代码拉取完成,页面将自动刷新
<?php
header("Content-Type:text/html;charset=utf8") ;
include_once 'include/jc_indent.php';
session_start();
date_default_timezone_set('PRC'); //设置时区
$consignee = $_POST['consignee']; //收件人
$sex = $_POST['sex']; //性别
$address = $_POST['province'].$_POST['city'].$_POST['area'].$_POST['detailaddress']; //地址
$telephone = $_POST['telephone'];
$buyer = $_POST['buyer'];
$email = $_POST['email'];
$express = $_POST['express'];
$status = $_POST['status'];
$userid = $_SESSION['userid'];
$postcode= '518000';
if($arr = $_SESSION['shoppingCar']){
$arr = $_SESSION['shoppingCar'];
$commodity ="";
$quantity ="";
$total = 0;
foreach($arr as $key=>$val)
{
$commodity .= $val['goodsname'].'@';
$quantity .= $val['num'].'@';
$total += $val['num']*$val['goodsprice'];
}
$orderdate = date('Y-m-d',time()); //获得当前时间
addIndent($userid,$commodity,$quantity,$consignee,$sex,$address,$postcode,$telephone,$email,$express,$orderdate,$buyer,$status,$total);
unset($_SESSION['shoppingCar']);
echo "<script>alert('Commit Order Success!');</script>";
echo "<script>location.href='index.php';</script>";
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。