i want to get all data to be put in input box where i will select in option box the name of the ingredients that i want to view for example in my data my ingID has a 1,2,3 name has a potato,carrot,beans kilo has a 3,4,5
if i have select the potato the value in input ingID will be 1 and value of input name will be potato and value of input kilo will be 5
is this possible?
<input type="text" id="ingID" name="ID">
<input type="text" id="name" name="name">
<input type="text" id="kilo" name="kilo">
<?php
include "core/database/connect.php";
$result = mysql_query("SELECT ingID , name , kilo FROM ingredients");
while($row = mysql_fetch_array($result)) {
echo '<option value = " ' .$row["name"]. ' " >'.$row["name"].'</option>';
}
?>