odd cookie behaviour

From: Date: Sun, 08 Apr 2001 01:10:13 +0000
Subject: odd cookie behaviour
Groups: php.general 
Request: Send a blank email to php-general+get-47607@lists.php.net to get a copy of this message
hey, i'm designing a small shopping cart w/ cookies where the cookie is used as an array (the array id being the product id) and the array value being the number of items selected. anyways, for the most part everything works fine, but with certain items if they're added to the cart, they get added, but unfortunately do not display in the cart until a few other items are added (the quantity of that product continues to increase regardless of whether or not it's shown in the cart). i have absolutely no idea why this is happening, and feel like i've tried most things that have come to mind. my cookie is being set like: if (!isset($cookie[0])) setcookie("cookie[0]", "0"); i do not have a product w/ id of zero (0), so i use that as the default id / value to set the cookie with. any suggestions _at_all_ would be appreciated. :) thanks, matt

« previous php.general (#47607) next »