I have a dropdown list that populates from the database
<td>
<select style="width:100%"class="CounterParty" >
<?php
echo '<option selected="selected"></option>';
$stmt = $conn->prepare("SELECT DISTINCT(CounterParty)
FROM dbo.tbl_hist_transactions
ORDER BY CounterParty DESC");
$stmt->execute();
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo '<option >'.$row['CounterParty'].'</option>';
}
?>
</select>
</td>
How can I modify it so that if I have a new Counterparty field that is not present in the field, the user can simply type in the new value. And it is entered in the database.
Thank You.