1 Star 1 Fork 0

Rookie_Guessed/JCShop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
commitOrder.php 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
Rookie_Guessed 提交于 2021-04-28 09:18 . First Commit
<?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>";
}
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/rookie-guessed/JCShop.git
git@gitee.com:rookie-guessed/JCShop.git
rookie-guessed
JCShop
JCShop
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385