【发布时间】:2014-02-06 02:20:15
【问题描述】:
我正在尝试在 Zend 1.12 中提交表单后创建感谢页面
在索引中我有表单,如果验证通过,我希望转到另一个视图(非索引)以获取感谢页面。我如何在我的代码中做到这一点:
public function indexAction()
{
// action body
$C_form = new Application_Form_Eform();
if ($this->_request->isPost()) {
$formData = $this->_request->getPost();
if ($C_form->isValid($formData)) {
$this->_helper->redirector('','result');
exit;
} else {
$C_form->populate($formData);
}
}
$this->view->form = C_eform;
}
然后我应该在哪里创建 .phtml 文件?在应用程序\视图\脚本\索引?
【问题讨论】:
标签: php zend-framework