public function updateaddrsprocessAction() { global $mySession; $db = new Db(); $this->_helper->layout->setLayout('myaccount'); if ($this->getRequest()->isPost()) { $request = $this->getRequest(); $myform = new Form_Changeaddress(); if ($myform->isValid($request->getPost())) { $dataForm = $myform->getValues(); $myObj = new Myaccountdb(); // call to model $data = $myObj->updateaddress($dataForm); if ($data == 1) { $mySession->errorMsg = "You have changed your address"; $this->_redirect('myaccount/profile'); } else { $mySession->errorMsg = "not successfull"; $this->render('profile'); } } else { $this->view->myform = $myform; $this->render('profile'); } } else { $this->_redirect('myaccount/profile'); } }