Here is my problem. I have a site into which users can login. It has a logout button to let the user log out. My problem is when they close the browser without logging out, how can I close the logged in entry in the database?? I need a way to run a piece of php script when the browser closes or if a session ending can trigger this. (Since the session is suppose to end when they close the browser.)
rajesh1158 -6 Light Poster
Roshan_10 commented: Set session time out for every 24hr. And now check if session exists or not. If it doesn't exist, execute query to insert necessary log into database. +0

diafol
rajesh1158 -6 Light Poster
Roshan_10 commented: Set session time out for every 24hr. And now check if session exists or not. If it doesn't exist, execute query to insert necessary log into database. +0

diafol
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.