public function executeSaveAboutYourself(sfWebRequest $request) { try { $data = $request->getParameter('data'); $data = json_decode($data); $member_id = $_SESSION['userId']; foreach ($data as $v) { $arrVal = (array) $v; $profile_choice_id = $arrVal['profile_choice_id']; $profile_id = $arrVal['profile_id']; $value = $arrVal['value']; $memProfile = new MemberProfile(); $memProfile->savePersonalInformation($member_id, $profile_choice_id, $profile_id, $value); } die(json_encode(array('success' => true))); } catch (Exception $e) { die(json_encode(array('success' => false, 'error' => $e->getMessage()))); } }