public function useraddressformajaxAction() { try { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $request = $this->getRequest(); if ($this->getRequest()->isPost()) { $mapper = new Gyuser_Model_AddressDataMapper(); $Obj = new Gyuser_Model_Address(); $Obj->setStreet($request->street); $Obj->setCity($request->city); $Obj->setZip_code($request->zip_code); $Obj->setState($request->state); $Obj->setAddress_type($request->address_type); $Obj->setDelivery_address((int) $request->delivery_address); $Obj->setClient_id($request->client_id); if ($request->id != '') { $Obj->setId($request->id); } $id = $mapper->save($Obj); if ($id) { echo $id; } else { echo "f"; } } } catch (Exception $e) { echo $e; } }