public function doInterestAction() { $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); if (!empty($params["interestid"])) { $interestid = $params["interestid"]; $interesttext = $params["interest"]; $core = new PR_Api_Core_CandidateClass(); if ($core->updateInterest($interestid, $interesttext)) { $ajaxRes['success'] = 1; } header("Location: interest"); } else { if (!empty($params["interest"])) { $core = new PR_Api_Core_CandidateClass(); $interestid = $core->AddInterest($CandidateProfileID, $params["interest"]); // echo "Testtt:<pre>";print_r($interestid);echo("</pre>");die(); if (empty($interestid["Erorr"])) { $ajaxRes['success'] = 1; } else { $ajaxRes['success'] = 0; $ajaxRes['info'] = $interestid["Erorr"]; } header("Location: interest"); } } header("Location: interest"); }