i have problem displaying data from database

here is an example of how it looks:

here is an example of how it looks

the hope is that I can display the data then be able to add the data to the new table

here is an example of how it looks:

here is an example of how it looks

<?php include "koneksi.php"; $sql="select * from po_list"; $hasil=mysqli_query($kon,$sql); $no=0;while ($data = mysqli_fetch_array($hasil)) {$no++; $ket="";if (isset($_GET['id'])) {$po_no = trim($_GET['po_no']); if ($po_no==$data['po_id']){$ket="selected";}} ?>
<?php $i = 1;if(isset($GET['po_no'])):$po_no=trim($_GET['po_no']);$order_items_qry = $conn->query("SELECT * FROM order_items where po_id = '{$row['id']}'");$sub_total = 0;while($row = $order_items_qry->fetch_assoc()):$sub_total += ($row['quantity'] * $row['unit_price']);?>