ThinkPHP中的修改方法

来源:互联网 发布:无锡cad软件培训 编辑:程序博客网 时间:2024/05/01 18:31

 

$M_shops = D('Orders');

 $data['order_area'] = '';// 暂时为空

 $user_cookie = $_COOKIE['hr_think_userid'];

 $data['order_cookie'] = $user_cookie;

 $data['order_address'] = htmlspecialchars($_POST['hitxt_address']);

 $data['order_name'] = htmlspecialchars($_POST['hitxt_name']); 

 $data['order_email'] = htmlspecialchars($_POST['hitxt_email']);

 $data['order_postcode'] = htmlspecialchars($_POST['hitxt_zipcode']);

 $data['order_tel'] = htmlspecialchars($_POST['hitxt_tel']);

 $data['order_phone'] = htmlspecialchars($_POST['hitxt_mobile']);

 $data['order_builder'] = htmlspecialchars($_POST['hitxt_building']);

 $data['order_time'] = htmlspecialchars($_POST['best_time']);

 $data['order_state'] = '0';

  $map = "order_cookie = '".$_COOKIE['hr_think_userid']."'";

  $M_shops->where($map)->save($data);

 

 

 

上面的例子是修改订单表

原创粉丝点击