public function contactAction() { $site = new Model_Site(); $contact_page = $site->getData("Pages", "PageType='Contact'"); $contact_url = $contact_page[0]['URLSegment']; if ($_POST) { $save = $site->saveInquiry($_POST); if (!is_array($save)) { $this->_helper->layout()->setLayout('page'); $this->view->inquirySaved = 1; $this->render('thankyou'); //$this->_redirect($contact_url); } else { if ($contact_page) { $contact_url = $contact_url . '?msg=Missing Fields'; } else { $contact_url = '/'; } $this->_redirect($contact_url); } } $this->render('page'); }