Код: Выделить всё
public function actionAddProblem() {
$model = new Problem;
if(isset($_POST['Problem'])) {
$model->attributes=$_POST['Problem'];
if($model->validate() && $model->save()) {
$this->redirect('problemList');
}
}
$this->render('addProblem', array('model'=>$model));
}