I read the discussion on how to check outstretched by HTML select and add in HTML text input.
Does not work in my case having a select dynamic that takes while loop with the data from DB. Could you help me find a solution?
I want to display the value and the text that is chosen in the select, in the form below in a text field.
<select name="auto" id="auto">
<option value="false">Auto non presente</option>
<?php while ($row = mysqli_fetch_array($result_modello)):; ?>
<option value="<?php echo $row['id_modello']; ?>"><?php echo $row['nome_modello']; ?></option>
<?php endwhile; ?>
</select>
<select name="marca">
<option value="false">Marca non presente</option>
<?php while ($row = mysqli_fetch_array($result_marca)):; ?>
<option value="<?php echo $row['id_marche']; ?>"><?php echo $row['nome_marche']; ?></option>
<?php endwhile; ?>
</select>