hi, i had a problem with my cart values, i am doing like this

choose product and select the value of quantity and then clickic the submit button of add to cart as:

it goes as :


i am using the following as:

if (@$pd)

$cart is registered as an array if cart not existed...

then the fuction is called as:

function displaycart()
global $cart, $totalprice;
echo "<table>";
echo "<tr><td>Product ID</td><td>Product Name</td><td>Quantity</td><td>Total Cost</td></tr>";
foreach (@$cart as $poneid => $qty)
$query="SELECT * FROM catalog WHERE id='".$_REQUEST["poneid"]."'";
while ($fetchproducts=mysql_fetch_array($result))
echo $fetchproducts['cost'];
echo $fetchproducts['p_name'];

does not show up the cart values, i do not what is wrong...

it always show 0 with 0 price, i try to select the quantity and id but something is wrong...............

i have also using he $cart script as:


but not working with the above code,