# [SOLVED] Log out button



## mattyjc_uk1 (Apr 24, 2008)

Hi I'm developing a website for someone and I have been html and php. I'm new to php does anyone know the code that will enable a log out button to log a user out and destroy both the cookie and the session?


----------



## dm01 (Oct 10, 2006)

*Re: Log out button*

The method described here: http://www.devarticles.com/c/a/PHP/PHP-for-Beginners-by-a-Beginners/ works quite well and is easy to implement. If I can do it, anyone can.


----------



## jamiemac2005 (Jul 5, 2007)

*Re: Log out button*

Just to add my 2 cents, the tutorials here: www.w3schools.com have an excellent set of PHP beginner tutorials(there is a tutorial on logging users in/out securely, though dm01 seems to have an article on that anyway)...

Cheers,
Jamey


----------



## mattyjc_uk1 (Apr 24, 2008)

*Re: Log out button*

ok it worked thanks for your help!


----------

