jd2007 Posted July 16, 2007 Share Posted July 16, 2007 How to use session_unset to log out a user ? pls show me an example... Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 16, 2007 Share Posted July 16, 2007 Alerady have done in your other thread! all you need is session_unset(); session_destroy(); put that code in side an if statement that checks if they clicked 'log out' or not.. Quote Link to comment Share on other sites More sharing options...
rameshfaj Posted July 16, 2007 Share Posted July 16, 2007 Use like this: session_start(); $_SESSION['username']=""; Quote Link to comment Share on other sites More sharing options...
tapos Posted July 16, 2007 Share Posted July 16, 2007 Romesh is right. If you use session_unset() function, this will not clean session files stored in the server. -- Tapos Pal Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 16, 2007 Author Share Posted July 16, 2007 how to use php to check wheter a user has clicked a button ? Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 16, 2007 Author Share Posted July 16, 2007 won't session_destroy clean the session files ? Quote Link to comment Share on other sites More sharing options...
tapos Posted July 16, 2007 Share Posted July 16, 2007 Use form and go just like the rretrival process of other variable. //just like this echo $_POST['btn_submit']; or echo $_GET['btn_submit']; -- Tapos Pal Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.