<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="css/table_min.css" type="text/css"/>	
</head>

<body>
<div class="CSSTableGenerator" id="chq_table1" >
<table width="1000" border="0">
  <tr>
    <td>Cheque No</td>
    <td>Cheque Date</td>
    <td>Cheque Amount</td>
    <td>Bank</td>
    <td>Customer</td>
  </tr>
  <?php
  include('connectioni.php');
							$sql="select cheque_no, che_amount, che_date, bank, refno, CUS_NAME, cus_code, ID, ret_refno  from s_invcheq where ret_refno='0' or ret_refno='1'  ORDER BY che_date desc ";
							//echo $sql;
							$stname = $_GET["stname"];
							$result=mysqli_query($GLOBALS['dbinv'],$sql);
							while($row = mysqli_fetch_array($result)){
								$cuscode = $row["ID"];
								
								
							echo "<tr>               
                              <td>".$row['cheque_no']."</a></td>
                              <td>".$row['che_date']."</a></td>
                         	  <td>".$row['che_amount']."</a></td>
							  <td>".$row['bank']."</a></td>
							  <td>".$row['cus_code']." ".$row['CUS_NAME']."</a></td>";
							                               
                            echo "</tr>";
							}
  ?>
</table>
</div>
</body>
</html>
