来源:自学PHP网 时间:2015-04-15 15:00 作者: 阅读:次
[导读] 还是 protected controllers simple php文件public function order_act(){ $address = $model-table(address)-where(id=$address_id)-find(); if(!$addre...
|
还是 protected\controllers\simple.php文件
public function order_act(){
.................
$address = $model->table("address")->where("id=$address_id")->find();
//if(!$address)$this->redirect("order",false,Req::args());
//if(!$payment_id)$this->redirect("order",false,Req::args());
$data['order_no'] = Common::createOrderNo();
.............
$data['addr'] = $address['addr'];//因为有字符限制 ,所以选择这个参数入
..........
//var_dump($order_products);exit();
//写入订单数据
$order_id = $model->table("order")->data($data)->insert();
public function address_save(){
$rules = array('zip:zip:邮政编码格式不正确!','addr:required:内容不能为空!','accept_name:required:收货人姓名不能为空!,mobile:mobi:手机格式不正确!,phone:phone:电话格式不正确');
$info = Validator::check($rules);
if(!is_array($info) && $info==true) {\\
Filter::form(array('sql'=>'accept_name|mobile|phone','txt'=>'addr','int'=>'province|city|county|zip|is_default|id'));
延时成功。 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com