<?php
// this file is called by list_driver_jobs when user selecte dates to find out which driver worked during these dates
include "../dbconfig.php";

$from=$con->real_escape_string($_POST['from']);
	  $from = str_replace("/","-",$from);
	  $from = date("Y-m-d", strtotime($from));
	
	  $to=$con->real_escape_string($_POST['to']);
	  $to = str_replace("/","-",$to);
	  $to = date("Y-m-d", strtotime($to));
?>
 <select name="driver_id" id="driver_id" class="form-control">
			       	   	 <option style="padding:10px; background-color:#E7D91E; color:#F9F0F1; cursor:pointer;" value="">Select a Customer </option>
                               <?php
							   $c=0;
							   $aname=array();
							    $aid=array();
								
								  $customers_sql1="SELECT * FROM creditors
where created BETWEEN '$from' AND '$to' order by name ASC";
$t_result1=mysqli_query($con,$customers_sql1);
									while($customer1=mysqli_fetch_assoc($t_result1))
									{
									
									?>
	<option style="padding:20px; background-color:#2977C9; color:#F9F0F1; cursor:pointer;" value="<?php echo $customer1['source_id']; ?>">
	   <?php echo $customer1['name']; ?>
    </option>
						<?php
									}								
								
							      ?>
			       	  </select>