public function createAction() { $frmMenu = new Form_Menu(); if ($this->getRequest()->isPost()) { if ($frmMenu->isValid($_POST)) { $menuName = $frmMenu->getValue('name'); $mdlMenu = new Model_Menu(); $result = $mdlMenu->createMenu($menuName); if ($result) { // redirect to the index action return $this->_forward('index'); } } } $frmMenu->setAction('/menu/create'); $this->view->form = $frmMenu; }