M.O.S. Studios Posted September 8, 2008 Share Posted September 8, 2008 Hey guys! Quick question, I would like to close a session with out destroying it. To be clearer I want the session id to remain so it can be recalled but I want all future actions to be placed into a new session any one know the command for that? Link to comment https://forums.phpfreaks.com/topic/123218-solved-session-question/ Share on other sites More sharing options...
M.O.S. Studios Posted September 8, 2008 Author Share Posted September 8, 2008 i figured out my own question this is how i did it $sid=session_id(); session_regenerate_id(); unset($_SESSION['cart']); unset($_SESSION['comments']); i set $sid, that gave me the old session id so i can pull it up later then i used session_regenerate_id(); to creat a new session the un set the values i no longer wanted. Link to comment https://forums.phpfreaks.com/topic/123218-solved-session-question/#findComment-636366 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.