hello frends, just want to ask questions, or advice about destroying a session.. i am now into a series of question in my head.. *how to destroy a session when a session did not undergo session_destroy() *how to "not" to destroy a session or to destroy it for example in some instances, power failure. *and how to set a session expire within a given time.. please help me on this.. thanks in advance.
-To destroy the session without session_destroy() you will have to manually kill the session cookie and remove all session variable using unset. This has the desired effect but isnt optimal. -You cant really hold onto a session. The only way around this is to set your own session cookies with an extended expiry time and store any session variables in the database or memory - Take a look at PHP's session_set_save_handler it allows you to overwrite PHP default session functions or simply use session_cache_expire($expireTime) It sounds like you need functionality outside what PHPs session handlers are designed to do. You might want to have a crack at creating your own session class. That way it can do exactly what you want Good Luck!
thanks man, some say that setrawcookie() function will do the trick, anyways ill try session_cache_expire instead.. any other more suggestions?