Answer the question
In order to leave comments, you need to log in
Entangled in sessions, untangle me?
Logging in to the site shows:
$_SESSION["UserName"] // имя сессии есть допустим ivan
$_COOKIE["Test"] // имя кук есть допустим mysite.com
// Уничтожаем сессию
if(isset($_SESSION["UserName"])){
session_destroy();
}
// Удаляем Cookie
SetCookie("Test","");
var_dump($_SESSION);
var_dump($_COOKIE);
array(1) {
["PHPSESSID"]=>
string(26) "ra7emp6j6vp6o85oqlclefi315"
Answer the question
In order to leave comments, you need to log in
PHPSESSID is a standard cookie - the key, provided that you have session_destroy somewhere in the code above, session_start();
you did it, it was deleted, but the key to it remained in the cookie. either delete it like test or check it is not called somewhere there (which you didn’t show here)session_start
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question