3
Hello,
I need to destroy all Sesssions when logging out a system except for just one... someone would know how to implement this with php?
For example:
- Let’s say I have 5 active sesssions when the user is logged in: - $session1 = $_SESSION['session1']; $session2 = $_SESSION['session2']; $session3 = $_SESSION['session3']; $session4 = $_SESSION['session4']; $session5 = $_SESSION['session5'];
- When logging out, I want to destroy 4 of these Sesssions, but there is one that I need to keep active... how would I look in this part? I tried so: - session_start(); if(!isset($_SESSION['session4'])){ session_destroy(); }//end if- so it didn’t work out... as it would be right?
 
Please avoid long discussions in the comments; your talk was moved to the chat
– Maniero