Welcome Guest, Not a member yet? Register   Sign In
problem in use of set_userdata and userdata.
#1

[eluser]SaSa[/eluser]
why after login, a data twice insert in database `user_data`, One of they in row `user_data` have value but another data in row `user_data` not have value. In other cases(ip_address-user_agent-last_activity), both are the `same` except `session_id`.<br>
the next call with `$this->session->userdata()` is the result `false`.<br>
Is this a problem?
How to fix?<p>
see you: http://i.stack.imgur.com/vUcIH.gif
Code:
$newdata = array(
                    'user'  => $this->input->post('useradmin'),
                    'logged_in' => TRUE
                    );
                $this->session->set_userdata($newdata);

    ////////////////////// in following code return is false //////////////////////////////////
    function foreign_tourt(){
            if($this->session->userdata('logged_in')) {
            $this->load->view('admin/foreign_tour');
            }else{
            return false;
            }
        }




Theme © iAndrew 2016 - Forum software by © MyBB