public function infoEditAction() { $form = new Admin_Form_InformationForm(); $form->submit->setLabel("Save"); $infoModel = new Admin_Model_Booking(); $bookingId = $this->_getParam('id', 0); $data = $infoModel->getDetailById($bookingId); $this->view->id = $bookingId; $form->populate($data); $this->view->form = $form; try { if ($this->getRequest()->isPost()) { if ($form->Valid($this->getRequest()->getPost())) { $formData = $this->getRequest()->getPost(); $bookingId = $formData['booking_id']; unset($formData['booking_id']); unset($formData['submit']); $infoModel->update($formData, $bookingId); $this->_helper->FlashMessenger->addMessage(array("success" => "Successfully edited personal information")); $this->_helper->redirector('payment', "index", "default", array("id" => $bookingId)); } } } catch (Exception $e) { $this->_helper->FlashMessenger->addMessage(array("error" => $e->getMessage())); } }