I would like to know why 'my datalist stores a number in my database instead of a name.
Let me explain.
I have a database with a table CLIENTS with fields: Customer, customername
I load the DataList with the clients that are in the BD and I save them in another table called FERTILIZERS with fields: id_abono, customername
$query = "SELECT * FROM clientes";
$result2 = mysqli_query($connect, $query);
<input list="browsers" name="myBrowser" class="form-control form-
control-lg">
<datalist id="browsers" >
while ($valores = mysqli_fetch_array($result2)) {
<option value=$valores['idcliente']>$valores['nombrecliente'].</option>
}
</datalist> <br>
appears to me:
The problem I have is that when I select one of the displayed values, the number (idcliente) appears and I need the name (clientname) to be stored in my FERTILIZERS table