hi
i have a shopping cart where i get the products from mysq,l the problem is whatever item i add to my cart it only add the last entry from the database here is my code
<form method="post" action="" class="jcart">
<fieldset>
<input type="hidden" name="my-item-id" value="<?php echo $all['id'];?>" />
<input type="hidden" name="my-item-name" value="<?php echo $all['title'];?>" />
<input type="hidden" name="my-item-price" value="<?php echo $all['sale_price'];?>" />
<input type="hidden" name="my-item-qty" value="1" size="3" />
<!--product item-->
<?php
//retrive categories from the categories table
$allitems=mysql_query("SELECT * FROM dg_products ")
or die("There are no records to display ... \n" . mysql_error());
?>
<?php while ($all=mysql_fetch_array($allitems))
{
?>
<div class="product_item">
<figure class="r_corners photoframe shadow relative hit animate_ftb long">
<!--product preview-->
<a href="#" class="d_block relative pp_wrap">
<!--hot product-->
<span class="hot_stripe"><img src="images/hot_product.png" alt=""></span>
<img src="/keiths/<?php echo $all['image'];?>" class="tr_all_hover" alt="">
<span data-popup="#<?php echo $all['id']?>" class="button_type_5 box_s_none color_light r_corners tr_all_hover d_xs_none">Quick View</span>
</a>
<!--description and price of product-->
<figcaption>
<h5 class="m_bottom_10"><a href="#" class="color_dark"><?php echo $all['title'];?> </a></h5>
<div class="clearfix">
<p class="scheme_color f_left f_size_large m_bottom_15"><s>£<?php echo $all['price'];?></s> £<?php echo $all['sale_price'];?></p>
<input type="submit"class="button_type_4 bg_scheme_color r_corners tr_all_hover color_light f_left mw_0" name="my-add-button" value="add to cart" /></form>