how to make log out forms in PHP?
have anybody its samples

logging you isn't a form it is a link that direct to a page where the session is destroyed. Put this on and link "Logout" to that page and the session will be destroy

<?
if(isset($_SESSION['user_id'])) {

session_unset();

session_destroy(); 

echo "You have been logged out.";

}
?>

Changed the 'user_id' with the name of your own session.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.