Jump to content

Logout code


tecmeister

Recommended Posts

session_start();

//if you registered any session variables, you'll need to unregister

session_unregister("SESS_USERNAME");

session_unregister("SESS_USERID");

session_destroy();

//to completely destroy session variables, set the $_SESSION to an empty array!

$_SESSION = array();

 

That is incorrect. session_destroy() unsets all session related information.

Link to comment
https://forums.phpfreaks.com/topic/90428-logout-code/#findComment-463606
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.