<?php
require_once '../includes/config.php';

// Unset all user session variables
if (isset($_SESSION['user_id'])) {
    unset($_SESSION['user_id']);
    unset($_SESSION['user_name']);
    unset($_SESSION['user_username']);
    
    // Destroy any cart data if needed
    if (isset($_SESSION['cart'])) {
        unset($_SESSION['cart']);
    }
}

// Redirect to login page instead of home page
redirect(SITE_URL . 'user/login.php');
?> 