Visa ett inlägg
Oläst 2003-09-29, 22:20 #3
matte99 matte99 är inte uppkopplad
Nykomling
 
Reg.datum: Mar 2003
Inlägg: 17
matte99 matte99 är inte uppkopplad
Nykomling
 
Reg.datum: Mar 2003
Inlägg: 17
Tack för ditt svar
Så här ser koden ut högst upp i shoppingcart.php, ser inte den koden du föreslog nånstans? Ser den riktig ut?

if(!$session && !$ShoppingCart) //make sure this hasn't already been
established
{
$session = md5(uniqid(rand())); //creates a random session value

// sets a cookie with the value of session.
// if it exists that is used

// delete sessions more than 2 days old
$today_date=date("Ymd");
$expired_date = $today_date - 20;
mysql_query("DELETE FROM ".$prefix."store_shopping WHERE
date>='$expired_date'");

//set the cookie to remain for 2 days
SetCookie("ShoppingCart", "$session",time()+$site_cookie);
matte99 är inte uppkopplad   Svara med citatSvara med citat