Welcome Guest, Not a member yet? Register   Sign In
Problem with session
#1

[eluser]Docmo[/eluser]
Hi,

I have a problem with getting the value saves in a session, here is my code:

Code:
if(isset($_POST['categorie']) && isset($_POST['contenu']) ||  strlen($this->session->userdata('search'))!=0)
        {
            if(isset($_POST['categorie']) && isset($_POST['contenu']) )
            {
                $newdata = array('search'=>$_POST['contenu'] , 'categ' => $_POST['categorie'] );
                $this->session->set_userdata($newdata);
            }
//code ...
}
else
{
//code
}

this code is in a function in the controller. In the first execution, the values in the $_POST, and i tested it and it works...

The page contains a pagination, the problem is when i click on for example "2" in the pagination, the session looses the data that i just saved in it!! i don't get it, session are supposed to save data during a user session, but i don't understand why it doesn't work!

Thanks for helping me


...
#2

[eluser]Docmo[/eluser]
sorry, it was a stupid mistake, please delete the post.


...




Theme © iAndrew 2016 - Forum software by © MyBB