function addexp($_post) { $user->id = $this->getuser(); $profile = new Workexperience($user->id); $result = $profile->create($_post); return $result; }
<?php include_once "../../../../../../libraries/aces/models/experience.php"; // echo json_encode($filter); $_POST['userid'] = $_POST['userid']; $_POST['position'] = $_POST['position']; $_POST['company'] = $_POST['company']; $_POST['joblocation'] = $_POST['joblocation']; $_POST['jobdetail'] = $_POST['jobdetail']; $_POST['jobstartd'] = $_POST['jobstartd']; $_POST['jobstart'] = $_POST['jobstart']; $_POST['jobendd'] = $_POST['jobendd']; $_POST['jobend'] = $_POST['jobend']; $_POST['current'] = $_POST['current']; $wex = new Workexperience(); $data = $wex->create($_POST); echo json_encode($data); // echo json_encode($_POST); // foreach($data as $edudata){ // echo json_encode($edudata); // }