views:

43

answers:

2

Hello,

Could anyone tell how to maintain a session (in PHP) so that the session contains are preserved and are accessible even after the browser is restarted.

In general a session expires with the closing of a browser, but I want the session NOT TO BE CLOSED so that the session data's can be accessed the next time the browser is used.

Thanks

A: 

Store session data somewhere in a DB and keep session ID in an encrypted persistent HTTP-only cookie.

Anton Gogolev
could you explain it a little bit more ? It would be better
Shoaib
+1  A: 

There is a really good tutorial on howto save session contents to a database. The only thing needed is to refill a new session with the saved data - there you go.

Thariama

related questions