webguync Posted April 10, 2009 Share Posted April 10, 2009 how would I combine a logout link and session_destroy()? <? session_destroy() <a href="">Logout</a> ?> cannot figure out the best way to do it. Quote Link to comment Share on other sites More sharing options...
runnerjp Posted April 10, 2009 Share Posted April 10, 2009 stick the session destroy on the logout.php page.. then add a redirect to the home page! Quote Link to comment Share on other sites More sharing options...
jackpf Posted April 10, 2009 Share Posted April 10, 2009 Lol sounds like a plan... Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted April 10, 2009 Share Posted April 10, 2009 <a href="logout.php">logout</a> logout.php <?PHP session_start(); $_SESSION = array(); session_destroy(); //redirect here; ?> 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.