TP自动验证,对非 Create不起作用吗?
public function register(){<br /> if($this->isPost()) {<br /> $Mem=D('Member');<br /> if( $Mem->Create()) {<br /> if($Mem->add())<br /> echo $Mem->getLastSql();<br /> $this->assign('waitSecond',3);<br /> $this->success("注册成功","__APP__/Member/login"); }
public function xinxixiugai(){<br /> if($this->isPost())<br /> {<br /> $Model=D('Member');<br /> $password=$_POST['password'];<br /> $tel=$_POST['tel'];<br /> $address=$_POST['address'];<br /> <br /> if($Model->Update($password,$tel,$address))<br /> { $this->success("更新成功",__APP__/Space/index);}<br /> else<br /> echo $Model->getError();<br /> }