shebbycs Posted November 24, 2011 Share Posted November 24, 2011 how to logout using session in proper way ? can you give me the code 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(); ?> 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(); 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(); Link to comment https://forums.phpfreaks.com/topic/251741-php-logout-with-session/#findComment-1290991 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.