I wanted to auto populate a drop-down form field in my search form. The field is a text field. The code I'm using of course duplicates the field for each: (i don't want duplicates) is there a way to do this?
I know I can use a text field on my search form but I was hoping I could get a list.
http://ridgefieldconnecticuthomes.com/listings.php
<select name="city">
<option value="">Any Town</option>
<?php
foreach ($listingsRecords as $record) {
print "<option value='{$listingsRecords['city']}'>{$record['city']}</option>";
}
?>
</select>
Darryl
http://darrylo.com