I have some questions concerning the php4 sessions: - when I close Netscape the session is over. Is it possible to reopen the session when I enter the site with the same Netscape? The reason is, I would like to keep the shopping basket when the user comes back. - does php clean up the TMP files? It seems that I will have an infinitive number of files if for everyone it writes one?
No you can't reopen the PHP session as PHP uses non-persistent cookies.
What YOU can do is have some other mechanism for recognizing the person such as a log in. Don't store the cart data in sessions but in a db. So when the person returns and logs in the cart is restored.
Build a table that holds the sessionID for the user, along with the contents of the shopping cart. Store that sessionID in a cookie. Read it back when the user returns. Or, if you have a login system, attach that same sessionID to the user.