I have a 5 star rating system which writes a cookie as the following when the user rates a product:
$pid = $_GET['pid']; //product ID (primary key) $ratepostpone = 300; //5 minutes until it expires and the user can rate again $cookieroot = '.mysite.com'; //my website's directory including sub domains setcookie('ms-'.$pid,'ms-'.$pid,time()+$ratepospone,'/',$cookieroot);
However I'm finding that when I vote on two products within 5 minutes of each other it is overwritting the cookie. When I check what cookies I have saved on my computer it lists one cookie (ms-483243) and then if I rate another product and re-check my cookies it has deleted ms-483243 and replaced it with (ms-218572)
any ideas why?
Thanks in advance,