Log in

View Full Version : Log Out Button



tomyknoker
06-15-2007, 11:53 AM
Hi all,

I am trying to make a logout button, I have no trouble with making it just link back to the index page, but how do I make it so that when the user clicks 'logout' it removes their session id and they need to login again?

EGMT
06-15-2007, 12:34 PM
Quite simple... you do a redirect to a page where you unset the relevant $_SESSION variables and after that you do a header("location: index.php"); exit;

The users has to log in again.