I've dumped a user's session data to a local text file. I then load in this text file at a later date with the code:
$filename = $_SERVER[DOCUMENT_ROOT] . "/saved_sessions/" . $_POST['load_session_file'];
$sessionfile = fopen($filename, "r");
session_decode(fputs($sessionfile, 409699) );
fclose($sessionfile);
print ("Session loaded from $filename<br>\n");
Problem: session_decode makes variables from the session file in the form $variable, rather than what I've consistently used throughout my application, $_SESSION['variable']. How can I change this behaviour so it creates variables in the form I need?