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

[eluser]brucebat[/eluser]
Yes it is autoloaded.

I dont understand what you mean by checking my database to find an array in there? Sorry

This was my original code but this only stored a variable "username" taken from post

Code:
if($query) // if the user's credentials validated...
        {
            $data = array(
                'username' => $this->input->post('username'),
                'is_logged_in' => true
            );
            $this->session->set_userdata($data);
            redirect('site/members_area');
        }

Want I want is once the user is found I want to store in my session their:

userID -
name -used for displaying in the user control panel
username - will be used for retrieving other info
access_level - to control what pages users can see


The table where this is all held in is called "user".

What I want is to take those columns from that table and store them in a session.

-----------

The older bit of code was working before but it is not sophisticated enough to allow me to implement my navigation and admin control panel that I want on the site.

Thanks for your time!


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