13 lines
296 B
PHP
13 lines
296 B
PHP
<?php
|
|
session_start();
|
|
|
|
// Check if the cart exists in the session
|
|
if (isset($_SESSION['cart']) && !empty($_SESSION['cart'])) {
|
|
echo '<pre>';
|
|
print_r($_SESSION['cart']); // Display cart contents in a readable format
|
|
echo '</pre>';
|
|
} else {
|
|
echo 'Cart is empty.';
|
|
}
|
|
?>
|