From 456508b99338cb5fbc6f226e5d6d39b383301821 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 8 Sep 2011 03:45:40 +0000 Subject: [PATCH] =?UTF-8?q?Ticket=20#148=20PDO::Statement=20=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/DataController.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 10d95ea8..12ce84e8 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -736,7 +736,6 @@ class DataController extends Zend_Controller_Action echo $form.''; exit(); } - $datas[$k]=preg_replace("/\"/i","'",$v); } if(!is_numeric($datas['postcode'])) @@ -751,11 +750,19 @@ class DataController extends Zend_Controller_Action exit(); } - $sql="insert into onlineapp (userid,username,unit,phone,address,postcode,project,uuid,email) - values ('$userid','{$datas['username']}','{$datas['unit']}','{$datas['phone']}','{$datas['address']}','{$datas['postcode']}','{$datas['project']}','$uuid','{$datas['email']}') - "; + $data = array( + 'userid' => $userid, + 'username' => $datas['username'], + 'unit' => $datas['unit'], + 'phone' => $datas['phone'], + 'address' => $datas['address'], + 'postcode' => $datas['postcode'], + 'project' => $datas['project'], + 'uuid' =>$uuid, + 'email' =>$datas['email'] + ); - if($this->db->exec($sql)) + if($this->db->insert('onlineapp',$data)) { echo "您的信息已经提交成功,可以进行下载。
如果页面没有自动跳转,请点击这里进入下载页面