I want to create a login system with "remember me" option, but am afraid to use cookies because I don't know how to handle the security for it, so I prefer to use session instead, but all session will be destroyed after 30 minutes or when user close the browser,
how can I make the session stay more than 30 minutes, lets say a day maybe .

Member Avatar

diafol

Why are you scared of cookies? Did you watch too much Sesame Street as a kid? Perhaps we share the same affliction - cross-eyed monsters screaming 'Cooookieeees' get me every time.

Seriously though, setting cookies on an user's machine should be fine. Here's a post on extending the 30 minute time: http://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes

Also note, if in the UK (or EU?), then you need to give notice of the intention and use of you storing cookies on an user's machine.

Why are you scared of cookies? Did you watch too much Sesame Street as a kid? Perhaps we share the same affliction - cross-eyed monsters screaming 'Cooookieeees' get me every time.

LOL that was hilarious :P
am afriad because its stored on client machine and I don't know to to secure them so the user ( The advanced user ) can't read them and use them to access forbidden areas.

if in the UK (or EU?)

no am not from these countries :D .

maybe I'll try to use session method, but I prefer to learn about cookies :D