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

(This post was last modified: 10-14-2015, 06:47 PM by vidhyaprakash85.)

i have problem in sessions.

PHP Code:
$this->obj->session->set_userdata("Auth""Y");
                
$this->obj->session->set_userdata("UserName"$Userdetails['UserName']);
                
$this->obj->session->set_userdata("UserFullName"$Userdetails['FullName']);
                
$this->obj->session->set_userdata("UserId"$Userdetails['ID']);
                
$this->obj->session->set_userdata("UserType"$Userdetails['Status']);
                
$this->obj->session->set_userdata("UserRoleID"$Userdetails['RoleID']);
                
$this->obj->session->set_userdata("UserRoleName"$Userdetails['RoleName']);
                
$_SESSION $this->obj->session->userdata

The above code i am using for session init. Sometimes automatically each page asks for login i don't know what happen. Once i clear cookies and recent history in my browser it works fine. May i know what is the problem and also i have give below the logout code.

PHP Code:
$this->session->sess_destroy();
        
session_unset();
        
session_destroy();
        
$this->session->set_userdata("Auth""Y");
        
$this->session->set_userdata("UserName"null);
        
$this->session->set_userdata("UserFullName"null);
        
$this->session->set_userdata("UserId"null);
        
$this->session->set_userdata("UserType"null);
        
$this->session->set_userdata("UserRoleID"null);
        
$this->session->set_userdata("UserRoleName"null);

        
$this->auth->Authencation("Y"__CLASS__); 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB