/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate($package = null) { $model = new Class_Prog(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if ($package != null) { $model->id_package = $package; } if (isset($_POST['Class_Prog'])) { $model->attributes = $_POST['Class_Prog']; //echo "~"; print_r($model->attributes); die; if ($model->save()) { $this->redirect(array('view', 'id' => $model->id_class)); } } $this->render('create', array('model' => $model)); }