Devine Posted August 1, 2007 Share Posted August 1, 2007 Ok, so I am working on a cookie / online_logs kind of login.. for guests, users, etc. I am using cookies to store an expiration for the cookie, username/password for the user, and an id (random number) .. It seems to somehow boot a logged in person after someone else logs in, it appears the way it is booted is the cookie "ID2" is somehow deleted. therefore losing its online_logs row, and creating a new one. I would like some help, but prefer to only show 1 or 2 people the code - to help. If you can help, my email is webmaster@pplboards.com or msn is you.understand@hotmail.com Thanks, Jordan. Quote Link to comment https://forums.phpfreaks.com/topic/62792-solved-cookie-login-trouble/ Share on other sites More sharing options...
btherl Posted August 1, 2007 Share Posted August 1, 2007 Have you considered using sessions? Quote Link to comment https://forums.phpfreaks.com/topic/62792-solved-cookie-login-trouble/#findComment-312614 Share on other sites More sharing options...
PC Nerd Posted August 1, 2007 Share Posted August 1, 2007 if your trying to log who logs in every time..... use Auto increment in the DB as the ID number, then simply assing that to the cookie, so that if at any time you need to pull data about the login eg time, its all stored in the DB.... and teh thign about sessions is right. I still use cookies, but i ined to change everything to Sessions. gdlk Quote Link to comment https://forums.phpfreaks.com/topic/62792-solved-cookie-login-trouble/#findComment-312618 Share on other sites More sharing options...
Devine Posted August 1, 2007 Author Share Posted August 1, 2007 Ok, well I want to find out how long a certain cookie has been set for (as in the time()+120) kind of setting.. I want to use php to find out what it is. any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/62792-solved-cookie-login-trouble/#findComment-312850 Share on other sites More sharing options...
Devine Posted August 2, 2007 Author Share Posted August 2, 2007 anyone? Quote Link to comment https://forums.phpfreaks.com/topic/62792-solved-cookie-login-trouble/#findComment-314065 Share on other sites More sharing options...
Devine Posted August 2, 2007 Author Share Posted August 2, 2007 *cough* Quote Link to comment https://forums.phpfreaks.com/topic/62792-solved-cookie-login-trouble/#findComment-314100 Share on other sites More sharing options...
btherl Posted August 2, 2007 Share Posted August 2, 2007 I don't think you can. You will need to store the expiry time on the server (which you can, since you created the cookie in the first place) Quote Link to comment https://forums.phpfreaks.com/topic/62792-solved-cookie-login-trouble/#findComment-314477 Share on other sites More sharing options...
Devine Posted August 3, 2007 Author Share Posted August 3, 2007 Well I was just going to do that to see if there was an error with the time() settings... But I just checked the cookies expiration manually via firefox... so yea, its all good. Thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/62792-solved-cookie-login-trouble/#findComment-314531 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.