<br>
<?php
  session_start();
  include '../_connect.php';
  // $lineid = $_REQUEST["lineid"];
  $lineid = "Uff65c46547b767eba0bccad926276760";
  if ($lineid != "") {
    $sql = "SELECT ct_no, ps_id, ps_name,serial_no,product_name FROM EHONGDB.dbo.hps_ctmain
    WHERE lineid = '$lineid' AND status like 'N'
    ORDER BY ct_no";
    // echo $sql;
    $select=$conn->prepare($sql);
    $select->execute();
    while ($fetch=$select->fetch()) {
      $ct_no = $fetch['ct_no'];
      $ps_id = $fetch['ps_id'];
      $ps_name = $fetch['ps_name'];
      $serial_no = $fetch['serial_no'];
      $product_name = $fetch['product_name'];
?>
<div class="box-shadowx" align="left">
  <b style="color:brown;">ผู้ซื้อ :</b>  <?php echo $ps_name; ?> <br>
  <b style="color:brown;">สินค้า :</b> <?php echo $product_name; ?>
  <hr>
  <center>
    <a href="checkdata.php?ct_no=<?php echo $ct_no; ?>"><input type="submit" name="" class="button_1 button1_1" style="font-size: 35px;" value="เช็คยอด"></a>
  </center>
</div>
<br>
<?php } ?>
<?php } else { ?>
  <br><hr><br>
  <div class="box-shadowx">
    ไม่พบข้อมูล
  </div>
<?php } ?>
