public function doEditSkillAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $request = $this->getRequest(); $params = $request->getParams(); $user = PR_Session::getSession(PR_Session::SESSION_USER); $CandidateProfileID = $user["CandidateProfileID"]; $ajaxRes = array('success' => 0, 'info' => null); // echo("testt:<prre>");print_r($params);echo("</pre>");die(); if (!empty($params)) { foreach ($params['data'] as $item) { if ($item['name'] == 'skill_id') { $SkillID = $item['value']; } if ($item['name'] == 'YearsExperience') { $YearsExperience = $item['value']; } if ($item['name'] == 'LevelOfExperience') { $LevelOfExperience = $item['value']; } if ($item['name'] == 'CandidateSkillID') { $CandidateSkillID = $item['value']; } } $core = new PR_Api_Core_CandidateClass(); if ($core->updateCandidate_skill($CandidateSkillID, $SkillID, $YearsExperience, $LevelOfExperience)) { $ajaxRes['success'] = 1; } } $response = $this->getResponse(); $response->clearAllHeaders()->clearBody(); $ajaxRes = json_encode($ajaxRes); $response->setHeader('Content-type', 'application/json'); $response->setHeader('Content-Length', strlen($ajaxRes), true)->setBody($ajaxRes); }