public function actionIndex() { $model = new XMLOptions(); if (isset($_POST['XMLOptions'])) { $model->attributes = $_POST['XMLOptions']; if ($model->validate()) { $model->save(); } } $this->render('index', array('model' => $model)); }