How to implement log out in PHP?
Implementing logout in PHP often will include a session_destroy(). But that is not all, you have to delete the session cookie and unset the session data. See PHP manual linked here under session_destroy for the full code.