View Full Version : sophisticated logging in and out using php/sql

11-01-2006, 09:22 AM
i'm still a bit confused as to what use.

i want a login system for my website, where members can log in easily.

ive got a registration form at the moment if they havent registered.

the thing is, when they log in, how do i make it so the login lasts for like 30 minutes? they can close the webbrowser, and when they re-open it, it should say that they are still logged in

what do you guys suggest? ive heard of cookies and sessions but i've never used any of them in code. anyone got any ideas, i need help!

11-01-2006, 10:07 AM
you could do this a couple of ways

you can use a session system which is readily available in PHP, you could use a database time comparison system or you could use cookies or even have a mix of them all.

there are sites which give you the remember me option and that would use cookies but if your on a shared machine then this is not big and its not clever

Proffessionally this is very wrong and defeats the point of implimenting a security system

why would you want to do this ??

in my opinion a security system should be as secure as a banking system no matter what.

11-01-2006, 08:52 PM
thanks for the information. Stuff the 'remember me' thing then.

I think I may just stick with sessions or cookies. But anyone got any php scripts using this stuff? classes etc. ?

11-02-2006, 07:48 AM
you should be able to write a bespoke one quicker than you could tweak one