I have two admin panels with different files and folders and when i destroying session after logging out from one admin panel it automatically destroying the other admin panel session, they both have different session names and variables .
session_unset($_SESSION['ticket_level']);
session_unset($_SESSION['ticket_name']);
开发者_JAVA技巧 session_destroy();
header("location: ../login.php");
this is something i am using for one of them , i am not sure what the heck is going on or is this the right way to do it for not
Use session_name() for different applications running on the same server. Ex:
Site A:
session_name('site_A');
Site B
session_name('site_B');
You must call it before session_start()
and on every single page.
Try to use
unset($_SESSION['ticket_level']);
session_unset is obsolet and is not meant to be used like this (it takes void as params)
精彩评论