<?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
$day = "SELECT DISTINCT `Crop Day` FROM `Load Data` ORDER BY `Crop Day` DESC"; 
	
				
$cd = $db->query($day);
//end


echo "<select name='cropday'>";
echo '<option selected disabled value="">Crop Day...</option>';
while ($row = $cd->fetch()) {
    echo "<option value='" . $row['Crop Day'] . "' >" . $row['Crop Day'] . "</option>";
}
echo "</select>";
