Advertisement
Guest User

Untitled

a guest
Nov 21st, 2013
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public function actionCreate()
  2. {
  3. $model=new User;
  4.  
  5. // Uncomment the following line if AJAX validation is needed
  6. // $this->performAjaxValidation($model);
  7. if(isset($_POST))
  8. {
  9. $model->attributes=$_POST;
  10. if($model->validate())
  11. {
  12. if($model->save())
  13. $this->redirect(array('index'));
  14. }
  15. else
  16. echo "hey";
  17. }
  18.  
  19. $this->render('create',array(
  20. 'model'=>$model,
  21. ));
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement