Welcome Guest, Not a member yet? Register   Sign In
[solved]Passing values from a record in a session?
#3

[eluser]brucebat[/eluser]
Thanks for your reply toopay.

Im still having problems with this code.

Code:
function authenticate()
    {        
        $this->load->model('login_model');
        $userlogin = $this->login_model->validate();
        
         if($userlogin) // if the user's credentials validated...
        {
            $userquery = $this->db->where('username', $this->input->post('username'))->get('user'); //retrieves all user info
        
        
            $se_data = $userquery->result_array(); //variable to store all user info
            $this->session->set_userdata('user', $se_data); //variable stored in session
            
            
            $message = "Login successfull you will now be redirected to the user page.";
            redirect('site/blog',$message);
        }
        else // incorrect username or password
        {
            $message = "Incorrect username or password";
            redirect('site/login', $message);
            
        }
    }


It seems to be compiling but my site is not responding to this session being created e.g. Navigaation menu changing and different links being displayed.

Sorry to be a pest!


Messages In This Thread
[solved]Passing values from a record in a session? - by El Forum - 06-23-2011, 12:38 PM
[solved]Passing values from a record in a session? - by El Forum - 06-23-2011, 12:57 PM
[solved]Passing values from a record in a session? - by El Forum - 06-27-2011, 05:48 AM
[solved]Passing values from a record in a session? - by El Forum - 06-27-2011, 08:15 AM
[solved]Passing values from a record in a session? - by El Forum - 06-27-2011, 08:36 AM
[solved]Passing values from a record in a session? - by El Forum - 06-27-2011, 09:45 AM
[solved]Passing values from a record in a session? - by El Forum - 06-27-2011, 11:12 AM
[solved]Passing values from a record in a session? - by El Forum - 06-27-2011, 11:47 AM
[solved]Passing values from a record in a session? - by El Forum - 06-27-2011, 01:00 PM
[solved]Passing values from a record in a session? - by El Forum - 04-06-2012, 07:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB