public function actionPresent() { $model = new Present(); if (isset($_POST['Present'])) { $model->attributes = $_POST['Present']; if ($model->save()) { $this->redirect('success'); } } $this->render('present', array('model' => $model)); }