shebbycs Posted November 24, 2011 Share Posted November 24, 2011 how to logout using session in proper way ? can you give me the code Quote Link to comment https://forums.phpfreaks.com/topic/251741-php-logout-with-session/ Share on other sites More sharing options...
ZulfadlyAshBurn Posted November 24, 2011 Share Posted November 24, 2011 <?php session_destroy(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/251741-php-logout-with-session/#findComment-1290978 Share on other sites More sharing options...
Drongo_III Posted November 24, 2011 Share Posted November 24, 2011 how to logout using session in proper way ? can you give me the code Hi mate The main two things you need to do are to unset the session variables and destroy the session. These two functions are the key: //remove all the variables in the session session_unset(); // destroy the session session_destroy(); Quote Link to comment https://forums.phpfreaks.com/topic/251741-php-logout-with-session/#findComment-1290979 Share on other sites More sharing options...
freelance84 Posted November 24, 2011 Share Posted November 24, 2011 Possible one more to be uber sure: $_SESSION = array(); Quote Link to comment https://forums.phpfreaks.com/topic/251741-php-logout-with-session/#findComment-1290991 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.