I\'m trying to correctly log out of an admin user. Here is my function:
function logout() { $_SESSION = array(); //destroy all of the session variables
Just a tip for others who are having issues expiring session cookies:
PHP - why can't I get rid of this session id cookie?
Always use session_get_cookie_params() as in the answer to the question in the link above.