<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header">INSURANCE EXPIRING</h1>
                </div>
                <!--end page header -->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
					 <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            DETAILS
                        </div>
                        <div class="panel-body">
                            <div class="row">
                   
<div id="mydiv">
  <input type="button" value="Print" onclick="PrintElem('#mydiv')"  style="margin:20px;">
  <table table class="table" border="0" align="center" cellspacing="0" cellpadding="10" width="100%" style="table-layout: fixed;">
					<col width="100px">
						<tr class="danger" style="color:purple;">
						<th>Name</th>
						<th></th>
						<th>Hpl</th>
						<th>Phone</th>
						<th>INSURANCE DATE</th>
						<th>FC DATE</th>
						<th>TAX DATE</th>
					</tr>
					
					<?php 
$x=1; 
while($x<=10000)
  {
  $qry2 = "SELECT * FROM customerdetails where mfin='$mfin' &&  hpl='$x'";
  $result = mysqli_query($conn, $qry2);
	if (mysqli_num_rows($result) >= 1) 
				{ 
	  $rs = mysqli_query($conn, $qry2);
	  // Loop the recordset $rs
	// Each row will be made into an array ($row) using mysqli_fetch_array
	while($row = mysqli_fetch_array($rs)) {

	   // Write the value of the column FirstName (which is now in the array $row)
	   $r = $row['name'];
	   $t = $row['hpl'];
	   $tr = $row['address'];
	   $u = $row['idate'];
	   $pp = $row['uname'];
	    $ss = $row['pwd'];

	   $roww = str_replace('/', '-', $row['pwd']);
$d1 = strtotime($roww);
$d2 = strtotime("today");
$min_date = min($d1, $d2);
$max_date = max($d1, $d2);
$i = 0;
while (($min_date = strtotime("+1 MONTH", $min_date)) <= $max_date) {
    $i++;
}}
if($i>=11 && $u!=NULL)
{?>
 <tr class="warning">
					<col width="100px">
					
	                    <td><?php echo $r;?></td>
						<td></td>
						<td><?php echo $t;?></td>
						<td><?php echo $tr;?></td>
						<td><?php echo $u;?></td>
						<td><?php echo $pp;?></td>
						<td><?php echo '<div><font size="3" color="red">'.$ss.'</font></div>';?></td></tr>

<?php
}		 					
				}$x++;	}?>
			
				</table>
 </div>
 
 
</div>
</div></div>
</div><?php include "layouts/footer.php"; ?></body></html>