FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


what is better? Sessions or Cookies





roee
Always we have the question: "what to use? Session or Cookies?"
and we dont know what to choose..

session is good but cookies is good too..
so what to do? what to choose?

i hope you have correct answere to this question


thanks
Jamatu
Both
JayBee
I have problems with sessions on frihost now Smile so I recommand cookies
n0obie4life
Jamatu wrote:
Both


Agreed. Always use both, it's like, the best security precaution Smile
Nyizsa
Depends on your intention. If you want to implement a members-area system, you should use sessions (and cookies, as the others have just written). If you want your site to remember people's personal settings, you need cookies.
To put it simply: sessions are for one session (as can be guessed by the name), cookies are for inter-session information storage.
snowboardalliance
I'm currently using a cookie to keep unique session IDs for logging in and storing that on the database along with user settings. I think it's pretty good.
frozenhead
Well, it depends.. I use both. Here's how I use them.

Session = members area, user authentication

Cookies = recording last user login and some site's automation. Wink
avk
I usually use sessions as they are more secure but however sessions depend on cookies
thnn
I use encrypted cookies. That way users are able to stay logged in after they close the browser. It does however depend on what you want. If you want a solution that is only for one browser session then sessions are a good idea, because they do not necessarily need cookies, so it will work on all browsers, provided you make all your links have the "php session id" in the link somewhere.
Rank-1
i think that the surest method is to use the sessions and save it to the database Wink
Related topics
php sessions
How To : Secure Your PHP Website
PHP: Sessions and Cookies
HOWTO?$lang files!
First XMLHttpRequest Object Project - A refreshless shoutbox
FireFox and Cookies/Sessions
Password Protecting a webpage
Directadmin Server 2 Problems
Need help with Members area/link adder
$_COOKIE and $_SESSION help needed!
How tough is PHP?
Sessions & cookies - member no longer active question
firefox 3 beta
Cookies - Sessions
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.