php shopping cart

Solutions on MaxInterview for php shopping cart by the best coders in the world

showing results for - "php shopping cart"
Mordecai
28 Nov 2016
1<?php
2$product_array = $db_handle->runQuery("SELECT * FROM tblproduct ORDER BY id ASC");
3if (!empty($product_array)) { 
4	foreach($product_array as $key=>$value){
5?>
6	<div class="product-item">
7		<form method="post" action="index.php?action=add&code=<?php echo $product_array[$key]["code"]; ?>">
8		<div class="product-image"><img src="<?php echo $product_array[$key]["image"]; ?>"></div>
9		<div class="product-tile-footer">
10		<div class="product-title"><?php echo $product_array[$key]["name"]; ?></div>
11		<div class="product-price"><?php echo "$".$product_array[$key]["price"]; ?></div>
12		<div class="cart-action"><input type="text" class="product-quantity" name="quantity" value="1" size="2" /><input type="submit" value="Add to Cart" class="btnAddAction" /></div>
13		</div>
14		</form>
15	</div>
16<?php
17	}
18}
19?>
20
queries leading to this page
shopping cart php mysqlphp shopping cart