<?
$rez=include("setup.php");
if (! $rez) //if can't find setup.php or not chmod'ed 
 {
  echo "<font color=red>Check setup.php file !</font>";
	exit;
 }

   if (! isset($cadd_ses) && isset($addme))
   {	
       $cadd_ses=array();
       while ( $elements=each($cadd) )
       {
       $cadd_ses[$elements["value"]]=1;
       }
	$result=0;
        $result=session_register("cadd_ses");
	if ($result)
          print "Operation succeeded<br><br>";
     }
   else if (isset($cadd[0]) )
   {
       while ( $elements=each($cadd) )
       {
        if (isset($cadd_ses[$elements["value"]])) //if the check this product to delete it from the list
         unset($cadd_ses[$elements["value"]]);
        else
         $cadd_ses[$elements["value"]]=1;
       }
          print "Operation succeeded<br><br>";
   }


/* print all array
       while ( $elements=each($cadd_ses) )
       {
        echo $elements["key"]." ";
       }
*/
?>
<HEAD><TITLE>Adding products to cart</TITLE></HEAD>