此代码有效,但重新加载页面时,会添加以前的项目

时间:2017-04-06 15:38:04

标签: javascript php html

<form method="post" action="cart.php?action=add&code=<?php echo $product_array[$key]["code"]; ?>"
    <div class="product-image"><img src="<?php echo $product_array[$key]["image"]; ?>"></div>
    <div><strong><?php echo $product_array[$key]["name"]; ?></strong></div>
    <div class="product-price"><?php echo "₹ ".$product_array[$key]["price"]; ?></div>
    <div><input type="Number" name="quantity" value="1" size="2" min="0.5" max="10" step="0.5" style="border-radius: 50px;width: 70px;height: 40px; border-style: ridge;text-align: center;" /><input type="submit" value="Add to cart" class="btn btn-warning"  /></div>&nbsp;&nbsp;
  <b>Note: Quantity should be in KG's</b>
</form>
</div> adding previous item when page reloads

0 个答案:

没有答案