/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new Jk(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['Jk'])) { $model->attributes = $_POST['Jk']; if ($model->save()) { $this->redirect(array('view', 'id' => $model->id_jk)); } } $this->render('create', array('model' => $model)); }
public function actionAGenders() { $Jk = new Jk(); $Views = View::model()->findAll(); if (isset($_POST['Jk'])) { $Jk->attributes = $_POST['Jk']; if ($Jk->save()) { $this->redirect(array('lgenders', 'fitback' => 4)); } } $this->render('agendes', array('Jk' => $Jk, 'Views' => $Views)); }