Jump to content

Recommended Posts

I have 2 values that I have stored in the database: 'logged_in_ip' and 'logged_in'. The first one logs there ip while they are logged in. The second one sets a value of 1 to logged_in when they are logged in so that no other user can log in with the same username while they are. I have set it so that when they log out it sets the ip to blank and the value of logged_in to 0. The problem that I am having is that if they dont go to the logout page and just exit the site it doesnt change these values. Does anyone know how I can force them to log out if they close the window or a better method to do this.

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/123810-database/
Share on other sites

That looks like something that could be useful but I am confused by the link that you have given to me. I am kinda a noob to php and mysql but am learning my way around. If someone could give me a basic example of how to use this session save handler to interact with mysql that would be great.  Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/123810-database/#findComment-639277
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.