public function actionInsert() { if (empty($_POST) == false) { $article = new Articles(); $article->data = $_POST; $article->insert(); header('Location: http://test/'); } else { $this->view->display('form'); } }