<?php

$q = strtolower($_GET["q"]);
if (!$q) return;
include 'db_connect.php';

//
//if(isset($_GET['veh_no']))
//$items = mysqli_query($con,"SELECT code FROM master where mstype='vno'");

//else if(isset($_GET['bill_no']))
$items = mysqli_query($con,"SELECT billno FROM billreg where billdate between '$_GET[fromdate]' and '$_GET[todate]'");



//else if(isset($_GET['billed_to']))
//$items = mysqli_query($con,"SELECT billedto FROM $bookingreg where dutydate between STR_TO_DATE('$_GET[fromdate]','%d/%m/%Y') and STR_TO_DATE('$_GET[todate]','%d/%m/%Y')");

//while($row = mysqli_fetch_array($items))
 // {
 // echo $row['value'];
 
//  }

while($row = mysqli_fetch_array($items)) {
	if (strpos(strtolower($row['billno']), $q) !== false) {
		echo $row['billno']."\n";
}
}
mysqli_close($con);


?>