Hi, Rich,
I've tried your code and all I got from the second page is blank. nothing in the browser's source code either.
If I take off $cookie = serialize( $cookie );
on the first page and $cart = unserialize( $cart ); on the second page, I would get "A A" on my browser where one "A" on the first line and another "A" on the second line.
I also found something interesting;
if I create a page with the follwoing code:
<?
$cart[0] = "0";
$cart[1] = "1";
$cart[2] = "2";
$cart[3] = "3";
$cart[4] = "4";
setcookie('cart', $cart, '', '/', '.mydomain.com');
?>
and the second page with this code:
<?
print "
$cart[0] $cart[1] $cart[2] $cart[3] $cart[4]";
?>
I first run the first page, then the second page. One the second page the browser displayed "A R R A Y".
It seems that the values of the $cart array has been changed to
$cart[0] = "A";
$cart[1] = "R";
$cart[2] = "R";
$cart[3] = "A";
$cart[4] = "Y";
This is really weird, It seems that cookies won't take arrays.
Thanks for your help, Rich.
Anybody know the answer?