<?php

$dbName = "G:\CBM\SC\data\D_SCALE.mdb";
if (!file_exists($dbName)) {
    die("Could not find database file.");
}
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");

//select data from db
$grower = "SELECT DISTINCT farmer FROM INSCALE"; 
	
				
$cows = $db->query($grower);
//end

echo "<select name='term'>";
echo '<option selected disabled value="">Select Farmer...</option>';
while ($row = $cows->fetch()) {
    echo "<option value='" . $row['farmer'] . "' >" . $row['farmer'] . "</option>";
}
echo "</select>";
