public function editattributeAction() { global $mySession; $db = new Db(); $attrId = $this->getRequest()->getParam('attrId'); $attrData = $db->runQuery("select * from " . ATTRIBUTE . " where attribute_id = '{$attrId}' "); $this->view->attrData = $attrData[0]; $this->view->attrId = $attrId; $this->view->pageHeading = "Edit Property Attribute"; if ($this->getRequest()->isPost()) { $request = $this->getRequest(); $dataForm = $_REQUEST; $myObj = new Attribute(); //prd($dataForm); $Result = $myObj->saveAttribute($dataForm, $attrId); if ($Result == 1) { $mySession->sucessMsg = "Attribute updated successfully."; $this->_redirect('property/attributes'); } else { $mySession->errorMsg = "This Specification you entered is already exists."; } } }