I want to output the data and also the buttons in my php codes. But i do not know why the buttons does not output as coded. Can anyone let me know where did my codes go wrong? I've been searching it but i cant't find the problem. Thanks in advance.
<?php
if(isset($_POST['invoice_details'])) {
     $discountsql = "INSERT INTO `invoice_price` (`order_id`) VALUES ('.$order_id.') ";
     $conn->query($discountsql);
}
$sql2 = " SELECT order_id FROM ordered_items GROUP BY order_id WHERE order_id = '".$row[order_id]."'  ";
$query2 = $conn -> query($sql2);
while ($row2 = $query2 -> fetch_assoc()) {
?> 
    <div class="col-12 form-group">
        <p> <?php echo $row2['order_id']; ?></p>
        <p class="text-success" pointer-events="none" style="font-weight: bold; font-size: 25px; text-align:center;">Your order is confirmed !</p>
        <a href="order-list.php">
          <input class="btn btn-block checkoutbtn" type="button" name="invoice_details"  value="Go to Order Page">
        </a>
    </div>
<?php
}
?>
 
    