make message not found in codeigniter -


i have problem, want make message in view page "no data found" in codeigniter:

this in controller:

 function search_keyword()   {        $this->output->set_header('expires: sat, 26 jul 1997 05:00:00 gmt');        $this->output->set_header('cache-control: no-cache, no-store, must-revalidate, max-age=0');        $this->output->set_header('cache-control: post-check=0, pre-check=0', false);        $this->output->set_header('pragma: no-cache');        $session_data = $this->session->userdata('logged_in');                     $data['username'] = $session_data['username'];        $keyword    =   $this->input->post('keyword');        $data['results']    =   $this->model_adminlogin->search($keyword);               $this->load->view('result_view',$data);   }      

try

function search_keyword()     {      $this->output->set_header('expires: sat, 26 jul 1997 05:00:00 gmt');      $this->output->set_header('cache-control: no-cache, no-store, must-revalidate, max-age=0');      $this->output->set_header('cache-control: post-check=0, pre-check=0', false);      $this->output->set_header('pragma: no-cache');        $session_data = $this->session->userdata('logged_in');              $username = $session_data['username'];              $keyword  = $this->input->post('keyword');              $data['results']  =  $this->model_adminlogin->search($keyword);             if(isset($data['results'])){                 $this->load->view('result_view',$data);             }else {               echo "<h1>data not found </h1>"             }      } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -