Invalidating session in php
But, the function is also called when the user refreshes the page.I have also considered using the interface Disposable Bean but its dispose() method is also called when the browser is refreshed.Note I'm not sure if solution provided below is perfect but it seems work for me.Please feel free to post any easier way to destroy a particular session.programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums Hi there, I wanted to invalidate a session by using sessionid.Scenario is like that I want to login with one application through one userid and password. I need to invalidate the other session to login again right now from now machine. My query is that can i invalidate that other machine session by using this databse sessionid value.
If you're using db or memcached to manage session, you can always delete that session entry directly from db or memcached.2.
which one of the above 3 script is more preferable? update : In order to kill the session altogether, like to log the user out, the session id must also be unset.
If a cookie is used to propagate the session id (default behavior), then the session cookie must be deleted.
I need to find a way to invalidate the session when the user closes the browser.