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
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.
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.
I usually use sessions as they are more secure but however sessions depend on cookies
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.