每当单击按钮时,我想填充每个数组值:
while($row=mysql_fetch_array($qry)){
$prodId = $row["ProductID"];
$imgID = $row["ImageID"];
$prodName = $row["ProductName"];
$prodPrice = $row["ProductPrice"];
$prodDesc = $row["prodDesc"];
$imgURL = $row["ImageUrl"];
$proNum = $prodId;
$dynamicListCol1 = '<div class="thumbnail" style="margin-bottom:10px;">
<img src="' . $imgURL . '" width="200" height="300" class="img-responsive" alt="Responsive image">
<center>
<div class="caption">
<h4>' . $prodName . '</h4>
<p>Price: $' . $prodPrice . ' <br>Description: ' . $prodDesc . ' <br></p>
<a data-toggle="modal" href="#cartModal">
<button type="submit" class="btn btn-success" id="btnCart">
<i class="icon-shopping-cart"></i> Cart it</button>
</a>
<a data-toggle="modal" href="#prodModal"><button type="submit" class="btn btn-info">
<i class="icon-search"></i> View it</button>
</a>
</div>
</center>
</div>';
echo $dynamicListCol1;
我想获取每个值$prodName
以及单击$prodPrice
的时间。btnCart
并将其填充到模态表中。
Product Price
Ebook $200
Ebook2 $150
等等等等...