-1

I have two processes. The first (#1) sets some session variables and also creates a cookie with the session_id in it. The second (#2)reads the cookie and runs this code:

session_id($_COOKIE['cookie_session']);
session_start();

I stop the code after the session start and I then look with the debugger at the $_SESSION (in #2). All I see in the is _ci_last_regenerate. My session variables are not in there. Why?

2
  • 3
    Why not use the standard PHPSESSID cookie?
    – Barmar
    Commented Jul 26, 2023 at 22:26
  • what procedure you follow to set the session? i am asumming you are using codeigniter 3, right?
    – jeyglo
    Commented Aug 25, 2023 at 3:32

1 Answer 1

0

to set the session in codeigniter 3 all you have to do is:

$this->load->library( 'session' );
$this->session->set_userdata( 'namesession', 'information_on_session');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.