Welcome Guest, Not a member yet? Register   Sign In
Geting Wrong Session Data using DB Session
#6

[eluser]thinkigniter[/eluser]
Got a question...
Shouldn't you be checking to see if the session data is set and then setting an d refreshing.

The way your code looks, to me, is that the next the page loads the session data is set again but with a NULL value.
E.G.
Code:
class Clients extends Controller
{
function Clients()
{
parent::Controller();
$this->load->library(array('db_session'));
}
            
function index()
{
$this->welcome_client();        
}
            
function welcome_client()
{
if( $this->session->userdata('client') == FALSE )
{
$this->db_session->set_userdata('client',$this->input->post('account_id'));

redirect('/Clients/welcome_client', 'refresh');

}else{
$this->load->view('index',$data);
}

}    

}

Or am I wrong?


Messages In This Thread
Geting Wrong Session Data using DB Session - by El Forum - 07-14-2008, 08:12 PM
Geting Wrong Session Data using DB Session - by El Forum - 07-14-2008, 11:38 PM
Geting Wrong Session Data using DB Session - by El Forum - 07-14-2008, 11:43 PM
Geting Wrong Session Data using DB Session - by El Forum - 07-22-2008, 03:47 AM
Geting Wrong Session Data using DB Session - by El Forum - 07-22-2008, 06:09 AM
Geting Wrong Session Data using DB Session - by El Forum - 07-23-2008, 04:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB