Destroy PHP session when user navigates away from page

I have a secure admin panel where a user has to be logged in. I want to be able to hand a tablet over to a client who will then input some data. I want to destroy the session if the page is left in any way. ie. Client clicks back button etc. (So that the client would not be able to get into sensitive materials without logging on again).

Any ideas?



Read more here: https://stackoverflow.com/questions/68476931/destroy-php-session-when-user-navigates-away-from-page

Content Attribution

This content was originally published by Tim B at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: