vijju124 Posted February 21, 2015 Share Posted February 21, 2015 (edited) I want a simple and easy session script using expiring time to creat and destroy or unset a session. please anyone help me to solve this problem. Edited February 21, 2015 by vijju124 Link to comment Share on other sites More sharing options...
niche Posted February 21, 2015 Share Posted February 21, 2015 Your question implies that you might have the skill to write such a script? If so, why don't you? Link to comment Share on other sites More sharing options...
davej Posted February 22, 2015 Share Posted February 22, 2015 I'm guessing you have read this tutorial? http://www.w3schools.com/php/php_sessions.asp So perhaps something like... if ( isset($_SESSION['ACTIVE'] ){ $TIMEOUT = 10 * 60; if ( (time() - $_SESSION['ACTIVE']) > $TIMEOUT ) { session_unset(); session_destroy(); }}else{ $_SESSION['ACTIVE'] = time();} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now