public function action_update_id() { if (Request::initial()->is_ajax()) { $id = Arr::get($_POST, 'val', ''); $id_new = Arr::get($_POST, 'new_val', ''); $ajax = new Model_Ajax(); $res = $ajax->update_id($id, $id_new); if ($res == 0) { $res = 1; } else { $res = 0; } echo $res; } }