function contact_type_save($id = '', $page = '') { $data['page_name'] = '<b>Save Training Contact Type</b>'; $data['msg'] = ''; $this->load->helper('list_box'); $contact = new Training_contact_type(); $data['contact'] = $contact->get_by_id($id); if (Input::get('op')) { $contact->contact_type = Input::get('contact_type'); $contact->contact_type_desc = Input::get('contact_type_desc'); $contact->save(); Session::flash('msg', 'Training Contact Type saved!'); return Redirect::to('training_manage/contact_type/' . $page, 'refresh'); } $data['main_content'] = 'contact_type_save'; return View::make('includes/template', $data); }