i dont follow you, but i'm gonna post my cart to show you how its set up, dont laugh.. lol.
<?
$quantity = abs($quantity);
$cost = abs($_POST['cost']);
$totalcost = $cost * $quantity;
$dbuser = 'Blade';
$dbpass = '****';
//connect to the DB and select the database
$connection = mysql_connect('localhost', $dbuser, $dbpass)
or die(mysql_error());
mysql_select_db('cart', $connection) or die(mysql_error());
//set up the query
$query = "SELECT * FROM HN_cart
WHERE product='$product' and cost='$cost' and quantity='$quantity'";
//run the query and get the number of affected rows
$result = mysql_query($query, $connection) or die("error making query");
$affected_rows = mysql_num_rows($result);
if($affected_rows > 0){
setcookie("product", $product, time()+1800) or die("error");
setcookie("cost", $cost, time()+1800) or die("error");
setcookie("quantity", $quantity, time()+1800) or die("error");}
echo "
<table width=\"163\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td align=\"center\"><font size=-2><u>Quantity</u></font></td>
<td align=\"center\"><font size=-2><u>Product(s)</u></font></td>
<td align=\"center\"><font size=-2><u>Price</u></font></td>
</tr>
<tr nowrap>
<td align=\"center\"><font size=-2>$quantity x</font></td>
<td colspan=\"2\" width=\"100\">
<font size=-2>$product</font>
</td>
<td><font size=-2></font></td>
</tr>
</table>
<table width=\"163\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr><td width=\"100%\"></td></tr>
<tr>
<td></td>
<td></td>
<td align=\"right\"><font size=-2>\$";
printf("%01.2f", $totalcost);
echo "</font></td>
</tr>
</table>
";
?>