Everyone who has had an account on ACDB has likely experienced the annoyance of having to log in again, and again, and again even when you never actually logged out yourself.
For years I have tried to solve this by looking in the wrong place.
A while back I added the "Keep Me Logged In On This Device" option that was to once and for all solve this, except it didn't.
Never understood why until I looked more closely at something I had over looked.
Cookies were being issued as Session cookies!
Which meant no matter what I had done, each time you closed your web browser you would be logged out. And with the nasty habit of today's browsers updating every 2nd day, this would get quite annoying.
Well, not any more!
Previously I called :
setcookie("SID", $cookie)
Now we use:
setcookie("SID", $cookie, time()+31556952, "/", ".animecharactersdatabase.com", TRUE);
Which will give you one year of not being logged out.
With the only exception being if you don't check the Keep Me Logged In option, you will still be logged out when your IP changes.