Welcome Guest, Not a member yet? Register   Sign In
How to keep a value while the page refresh ?
#6

[eluser]ludo31[/eluser]
thank you so much guy it works for someone who have the same problem I proceed like that

Code:
public function rechercher ()
{

  


     /* ici je tente de les recuperer */
       $province=$this->input->post('province');
       if(strlen($province)>0){
           $this->session->set_userdata('prov',$province);
       }
      
       $province2 = $this->session->userdata('prov');
      
      
       $categorie=$this->input->post('categorie');
       if(strlen($province)>0){
           $this->session->set_userdata('cate',$categorie);
       }
      
       $categorie2 = $this->session->userdata('cate');
      
      
       $config['uri_segment']=3;
      
      
      
       /* necessaire pour la pagination */
     $offset = $this->uri->segment(3);
            $limit = 2 ;
      
      
           $config['base_url']='http://localhost/MonSite/index.php/annonce/rechercher';
          
      $config['per_page']= $limit;
          
            $config['total_rows']= $this->annoncemodel->getRowAnnonceRecherche($province2,$categorie2);
            
                 $data['infos'] = $this->annoncemodel->getAnnonceRecherche($province2,$categorie2,$config['per_page'],$offset);
            
       /* pgination */
            
            $config['num_links']=5;  
            
            $config['per_page']= $limit;
            
            $config['full_tag_open']='<div id="pagination">';
            
             $config['full_tag_close']='</div>';
            
             $config['next_link']='>>';
            
              $config['prev_link']='<<';
              
              $this->pagination->initialize($config);
        
            
          
             /*on l'envoie à la vue de nouveau */      
                
                
              
      
                
                



            $this->pagination->initialize($config);
            $data['pag_links'] = $this->pagination->create_links();
            
            
    
      
      
              $this->load->view('principalannonce',$data);
              
              
      
      
      
      


}

so I must change the name of the variable here

$categorie2 = $this->session->userdata('cate');

thank you so much



Messages In This Thread
How to keep a value while the page refresh ? - by El Forum - 03-23-2012, 01:28 AM
How to keep a value while the page refresh ? - by El Forum - 03-23-2012, 03:27 AM
How to keep a value while the page refresh ? - by El Forum - 03-23-2012, 04:11 AM
How to keep a value while the page refresh ? - by El Forum - 03-23-2012, 04:44 AM
How to keep a value while the page refresh ? - by El Forum - 03-23-2012, 05:41 AM
How to keep a value while the page refresh ? - by El Forum - 03-24-2012, 01:08 AM
How to keep a value while the page refresh ? - by El Forum - 03-25-2012, 12:47 PM
How to keep a value while the page refresh ? - by El Forum - 03-25-2012, 01:30 PM
How to keep a value while the page refresh ? - by El Forum - 03-25-2012, 02:02 PM
How to keep a value while the page refresh ? - by El Forum - 03-25-2012, 02:15 PM
How to keep a value while the page refresh ? - by El Forum - 03-25-2012, 04:07 PM
How to keep a value while the page refresh ? - by El Forum - 03-25-2012, 05:52 PM
How to keep a value while the page refresh ? - by El Forum - 03-25-2012, 08:10 PM
How to keep a value while the page refresh ? - by El Forum - 03-25-2012, 11:47 PM
How to keep a value while the page refresh ? - by El Forum - 03-27-2012, 12:20 PM
How to keep a value while the page refresh ? - by El Forum - 03-27-2012, 01:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB