Advertisement
Guest User

Untitled

a guest
Aug 19th, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public function actionUpdate($id)
  2. {
  3.  
  4. $model=$this->loadModel($id);
  5.  
  6. // Uncomment the following line if AJAX validation is needed
  7. //$this->performAjaxValidation($model);
  8.  
  9. echo $model->isNewRecord;
  10.  
  11. if(isset($_POST['Program']))
  12. {
  13. $model->attributes = $_POST['Program'];
  14.  
  15. if($model->save()){
  16.  
  17. $this->redirect(array('admin'));
  18. }
  19. }
  20.  
  21. $this->render('update',array(
  22. 'model'=>$model,
  23. ));
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement