Yohanne Posted October 20, 2014 Share Posted October 20, 2014 Hi, i have two methods with different function, each is calling to view a record from database. now i want store this two methods into one view. ex. model function 1() { table_0ne } function 2() { table_two } controller function 1() { view 1,2 } it is possible, please help.. and i have code below, and it is not work when i apply $datax public function generate_po() { $po_id = $this->input->post('selector'); $data['result'] = $this->public_base_model->generate_po($po_id); $datax['result'] = $this->public_base_model->get_max_num(); if($this->session->userdata('logged_in')) { $session_data = $this->session->userdata('logged_in'); $data['username'] = $session_data['username']; $data['fname'] = $session_data['fname']; $data['userid'] = $session_data['userid']; $this->load->view('generate_po', $data, $datax); } else { $this->load->view('login'); } } Link to comment https://forums.phpfreaks.com/topic/291935-ci-store-two-function-in-one-view/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.