I'm trying to destroy visitors cookie
and session
at same time when he/she logs out. Like this:
setcookie($id, '', time()-13600, "/");
unset($_SESSION[$id]);
Although cookie
destroys but user is still logged in because session
not destroying.
Note: I can't use
session_unset()
because it will destroy all the sessions.
PS: I solved my problem just by not setting session but only cookie, still i can't solve problem i asked above.