Welcome Guest, Not a member yet? Register   Sign In
how to display username in header using session
#2

(This post was last modified: 04-21-2017, 08:30 AM by Martin7483.)

You get 1 because you are setting the user_id with the value of $login_id and not the username with the value of $username
PHP Code:
$this->session->set_userdata('user_id',$login_id); 

So also set the username
PHP Code:
$this->session->set_userdata('username',$username); 

And what type of value is returned for $login_id?
Reply


Messages In This Thread
RE: how to display username in header using session - by Martin7483 - 04-21-2017, 08:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB