2

My script login is like this :

public function validate_login()
{
   ...
   echo '<pre>';print_r($this->session->all_userdata());die();
   ...
}

The result of print_r :

<pre>Array
(
    [__ci_last_regenerate] => 1465192054
)

In table ci_sessions, update record like this :

enter image description here

I want to take id(737d1bd741c9c06ceda3a3a45c1009fc5fafd44a) in table ci_sessions. but i'm still confused.

How to take id in table ci_sessions?

Thank you

moses toh
  • 10,726
  • 57
  • 212
  • 388

1 Answers1

1

In Codeigniter 3 there is a function called session_id() by which you may get the session ID.

For more details

http://www.codeigniter.com/user_guide/libraries/sessions.html#accessing-session-metadata

Moreover you can still access $this->session->session_id to get session ID

Rejoanul Alam
  • 5,365
  • 3
  • 36
  • 67