<?php
setcookie('access_token', '', time() - 3600, '/');
setcookie('user_id', '', time() - 3600, "/");

$expire = time() - 3600;

// Iterate through all cookies and delete them
foreach ($_COOKIE as $key => $value) {
    setcookie($key, '', $expire, '/');
}

session_start();
session_destroy();

// Redirect to a login page or any other desired page after logout
header("Location: login.php");
exit;

