<?php
session_start();

// Unset all session variables
$_SESSION = [];

// Destroy the session
session_destroy();

// Optionally delete remember-me cookie
if (isset($_COOKIE['wfm_phone'])) {
    setcookie('wfm_phone', '', time() - 3600, '/');
}

// Redirect to login page
header("Location: login.php");
exit;