public function createAction() { $frmCate = new Application_Form_Category(); if ($this->getRequest()->isPost()) { $cateName = $this->_request->getParam('cate_name'); if ($frmCate->isValid($_POST)) { $mdlCate = new Application_Model_DbTable_Category(); $result = $mdlCate->createCate($cateName, BLOGGER_ID); if ($result) { $cache = Zend_Registry::get('cache'); $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array('artcatebox')); // redirect to the index action //$this->_redirect ( '/category/index' ); $this->_forward('index'); } } } if ($this->_request->getParam('pid')) { $pelem = $frmCate->createElement('hidden', 'pid'); $pelem->setValue($this->_request->getParam('pid')); $frmCate->addElement($pelem); } $frmCate->setAction('/' . BLOGGER_NAME . '/category/create'); $this->view->form = $frmCate; }