<?php
session_start();

// Clear the cart items in the PHP session
$_SESSION['cart'] = [];

// Send a success response
http_response_code(200);
echo json_encode(['message' => 'Cart cleared successfully']);
?>
