0

Im working with codeigniter framework, and i was doing a search page. when i enter keyword and search for that keyword, a list of result will show. From that list i click detail of one result, from that detail page i click browse back button it showing error page

Confirm Form Resubmission

This webpage requires data that you entered earlier in order to be properly displayed. You can send this data again, but by doing so you will repeat any action this page previously performed. Press the reload button to resubmit the data needed to load the page.

ERR_CACHE_MISS

this is my controller function

public function search(){
        $data["page"] = "search_companies";
        $base_url .= HOST_URL."/search/companies";
        $uri_array = $this->uri->uri_to_assoc(3);
        if(isset($_POST) && count($_POST) != 0) {
        $keyword = $this->input->post("search_txt", TRUE);
        $_SESSION['keyword']=$keyword;
        }
        else{
        $keyword=$_SESSION['keyword'];
        }
        $user_id = $this->session->userdata("user_id");
        $data['user_id']=$user_id;
        $this->load->library('pagination');
        $offset    = (array_key_exists('offset',$uri_array) ? trim($uri_array["offset"]) : 0);
        $limit     = (!empty($paging) ? $paging : "30" );           
        $base_url .= "/offset";
        $limit1 =("6");
        $limit23 = ("6");           
        $total_records = $this->modelNameAlias->countSearchResults($keyword);
        $uri_segments  = $this->uri->total_segments();
        if($uri_segments==3){
        $uri_segments=4;
        }
        else{
        $uri_segments=$uri_segments;
        }       
        $config = user_side_paging($limit,$total_records, $base_url, $uri_segments);
        $this->pagination->initialize($config);
        $data['links'] = $this->pagination->create_links();
        $by         = "DESC";
        $sortWith  = "added_date";
        $data_list = $this->modelNameAlias->get_search_records($keyword,$limit, $offset, $sortWith, $by);
        $this->load->model("model_followers");
        $where_array["user_id"] = $user_id;
        $where_array["is_active"] = "Y";    
        $data["data_user123"] = $this->model_followers->get_all_records($where_array, $limit23, $offset, $sortWith, $by);
        $where_array1["target_id"] = $user_id;
        $where_array1["is_active"] = "Y";
        $data["data_user_myf"] = $this->model_followers->get_all_records($where_array1, $limit1, $offset, $sortWith, $by );    
        $data["data_list"]        = $data_list;
        $data["search_text"]      = $keyword;
        $data["display_records"]  = display_records($total_records, $offset, $limit);
        $data["total_records"]    = $total_records;
        $data['offset']           = $offset;
        $data["paging"]           = $limit;
        $this->load->view("template", $data);
    }

How to solve this problem?

AB Tech
  • 35
  • 1
  • 7

0 Answers0