Welcome Guest, Not a member yet? Register   Sign In
Session does not work as I expect it should
#1

[eluser]SPeed_FANat1c[/eluser]
Hi,

In the index page I have this code:

Code:
$psl =$this->uri->segment(4);
        
$this->session->set_userdata('puslapis', $psl);
            
echo $this->session->userdata('puslapis');

There I am saving page of pagination class so the next time I call this function it could go directly to the saved page. And it echoes correct number. But in database the stored value is not the number - it is 'js'. And when I call
Code:
echo $this->session->userdata('puslapis');
from the other function I get 'js'. Why doesn't it save the data correctly?
#2

[eluser]pickupman[/eluser]
Double check you haven't set the same key somewhere else, and are overwriting the value you want.




Theme © iAndrew 2016 - Forum software by © MyBB