I must be missing something. Can anybody see why this isn't displaying the results of the cookie, and is not in fact seemingly created at all:
Code:
<?php
if(isset($_COOKIE['cart_id'])) {
$cart_id = $_COOKIE['cart_id'];
} else {
$cart_id = md5(uniqid(rand()));
setcookie("cart_id", $cart_id, time() + 3600);
}
echo ($_COOKIE['cart_id']); ?>
I'm stumped.