Question about PHP site

Hello,

I am implementing cubecart into a web site, but I have a question about one of the pages-

The adding of products is successful, and they can view their cart etc, all of the information is being passed via a cookie called session. But for some reason I need to pass &session=$session for every link, for it gets lost. When you add a product it is fine, but here is the problem. In ever category except for Nascar everything wil ladd and the information will be kept in the cookie etc.

On http://www.miniatureracing.com and then under decals >> nascar >> any category after you have products in your cart it loses the cookie for some reason. I noticed that it only happens with Nascar, and with Nascar it is the only category with sub-categories beneath it. What can be the problem, and would it be possible to stop using &session=$session for every link? Here is the cookie PHP-

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 6 hours older than the cookie length set in admin

		// this means that shopping basket data will be deleted from the basket 6 hours

		// after the session cookie has expired.

		$time = time();



		$expired_time = $time - (21600 + $site_cookie);

		

		mysql_query("DELETE FROM ".$prefix."store_shopping WHERE date<='$expired_time'");

  

		SetCookie("ShoppingCart", "$session",time()+$site_cookie);

	}

Also, on the index.php I am including all of the necessary files such as config and settings and the index.php?mini=cart is going to the directory /cart/index.php