Problem: My client said like cookies should expire in 2 hours and if the user close the browser before 2 hours then automatically clears the cookies. Solution: Just don’t put expire date. thats all. for more articles. http://wordpressblog.calliarc.com/
It's actually the reverse, the cookies expire but the sessions remain (until it's automatically cleaned up). Then, next time you open your browser, you'll get a new cookie which also means a new session id so it won't attach to your old session.
In my view the normal setting of the cookies and session record in most cases is that the cookies expire, and the session remains attached (untill it is ceared automaticly.
I avoid both and use sessions when needed for like logins and such. Anything that pertains to needing to know the user is 'there' - sessions is the way I approach it, even if it means just storing their ip in a session or under and md5 without a login. Too many inconsistencies in my book for 'cookies' or php_sessions