I'm trying to make an online store, in my case what I want to do is show the products that are sold (I already have it) but I want the client to see more product information in another window with the images (as do all stores) in my case I show the products from PHP
I send them to print directly from the BD
.
My idea is to try that the product that I select shows it to me in the other tab (only that one) I think that for that I have to save the value of the selected product and send it to the other side from there either with the ID send to request the information or send all the information from the other PHP
.
<div class="container">
<?php include('pospos/user/cart_search_field.php'); ?>
<div style="height: 80px;"></div>
<div>
<?php
$inc=4;
$query=mysqli_query($conn,"select * from product where categoryid = 1");
while($row=mysqli_fetch_array($query)){
$inc = ($inc == 4) ? 1 : $inc+1;
if($inc == 1) echo "<div class='row'>";
?>
<div class="col-lg-3">
<div>
<img src="pospos/<?php if (empty($row['photo'])){echo "upload/noimage.jpg";}else{echo $row['photo'];} ?>" style="width: 230px; height:230px; padding:auto; margin:auto;" class="thumbnail">
<div style="height: 10px;"></div>
<div style="height:40px; width:230px; margin-left:17px;"><?php echo $row['product_name']; ?></div>
<div style="height: 10px;"></div>
<div style="display:none; position:absolute; top:210px; left:10px;" class="well" id="cart<?php echo $row['productid']; ?>">Qty: <input type="text" style="width:40px;" id="qty<?php echo $row['productid']; ?>"> <button type="button" class="btn btn-primary btn-sm concart" value="<?php echo $row['productid']; ?>"><i class="fa fa-shopping-cart fa-fw"></i></button></div>
<?php
$variable1 = ['productid'];
$variable2 = "";
?>
<div style="margin-left:17px; margin-right:17px;">
<button type="button" class="btn btn-primary btn-sm addcart" value="<?php echo $row['productid']; ?>"><i class="fa fa-shopping-cart fa-fw"></i> Add to Cart</button> <span class="pull-right"><strong>$<?php echo number_format($row['product_price'],2); ?></strong></span>
</div>
</div>
</div>
<?php
if($inc == 4) echo "</div><div style='height: 30px;'></div>";
}
if($inc == 1) echo "<div class='col-lg-3></div><div class='col-lg-3'></div><div class='col-lg-3'></div></div>";
if($inc == 2) echo "<div class='col-lg-3'></div><div class='col-lg-3'></div></div>";
if($inc == 3) echo "<div class='col-lg-3'></div></div>";
?>
</div>