I am trying to implement simple login and logout mechanism. When the user logs in I am creating the session by using session_start(). and upon the user logging out I am calling
session_unset();
session_destroy();
but the problem is that after logging out next time if again login. the session_id() is same as previous. No matter how much I do the session_destroy(), the session_id() is always the same. Does it mean session_destroy() is not working? Or there is some other reason?
Change
To
As with your code session is not really being destroyed.