Initial commit
This commit is contained in:
21
OLD/loaddata/growerselect_old.php
Normal file
21
OLD/loaddata/growerselect_old.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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>";
|
||||
Reference in New Issue
Block a user