I am running PHP 7.2 and need to regenerate and set the desired id for an already active session as follows...
session_start(); // the session is activated
...
...
$newSessionID = session_create_id();
...
...
if ($someConditionIsSatisfied) {
session_regenerate_id($newSessionID);
}
The problem: session_regenerate_id() auto-creates a new session id but doesn't have the ability to take a specific session ID as input.
...so I'm stumped as to how to regenerate a session having "my desired id".
Does anyone know how I might achieve the above in PHP?