<php
$sql_product_new = "Select P.*,pt.*,jp.Pro_id,jp.Js_discount,pro.Discount from products as P INNER JOIN product_types as pt ON P.Pt_id = pt.Pt_id Left JOIN joinpromotions as jp ON jp.P_id = P.P_id LEFT JOIN promotions as pro ON pro.Pro_id = jp.Pro_id Where P.Qty > 0 AND P.Status = 1 Order BY P.P_id DESC LIMIT 0,6";
$query_product_new = mysqli_query($objConnect, $sql_product_new);
while ($value_product_new = mysqli_fetch_assoc($query_product_new)) {
?>
<input type="hidden" name="P_id" value="<?= $value_product_new['P_id'] ?>">
<input type="submit" class="btn btn-default" value="<?=$value_product_new['P_id']?>">
<?php
}
?>