I have a script and want to keep people from being able to view it unless they login. And then when logged in they get to look at all the pages until they leave, then if returning they have to loggin once again.
I am considering sessions but havent used them often.
Any recommendations?
Thanks
Login Options
Moderator: General Moderators
-
reverend_ink
- Forum Contributor
- Posts: 151
- Joined: Sun Apr 20, 2003 1:18 am
- Location: Las Vegas | London
-
reverend_ink
- Forum Contributor
- Posts: 151
- Joined: Sun Apr 20, 2003 1:18 am
- Location: Las Vegas | London
man everyone loves sessions, I dont really fancy em, they're nice, but ah well..
i'm an old school cookie man =]
setcookie () with combo of isset() will create a handy dandy way of keeping users logged-in and they're info (username n password, etc) for a easy fetch.
even better - a combo of them both
i'm an old school cookie man =]
setcookie () with combo of isset() will create a handy dandy way of keeping users logged-in and they're info (username n password, etc) for a easy fetch.
even better - a combo of them both
Sessions can do pretty much exactly the same stuff cookies can, except sessions terminate once the browser is closed or you specifically terminate it in your code.
Cookies are good if you want to keep someone logged in to your site once they leave but if you are trying to just do a one time visit authentication then I would say use sessions.
Cookies are good if you want to keep someone logged in to your site once they leave but if you are trying to just do a one time visit authentication then I would say use sessions.