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 "您的信息已经提交成功,可以进行下载。
如果页面没有自动跳转,请点击这里进入下载页面