I have A question in php and jquery When i Select Itemname All information From item name are display on a textbox.. How To do this with jquery?
Here is my codes..
PHP
$iname = $mysqli->prepare("SELECT itemname,quantity,critical_level FROM table_inventory");
$iname->execute();
$iname->bind_result($itemname);
$iname->store_result();
$itemnames = array();
while($iname->fetch())
{
$itemnames[] = $itemname;
}
<form>
<div class="form-group ">
<label for="group" class="control-label col-lg-2">Item Name</label>
<div class="col-lg-10">
<select id="quantity" name="quantity" class="form-control">
<option disabled selected>Item Name</option>
<?php foreach ($itemnames as $i): ?>
<option><?=$i?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="form-group ">
<label for="group" class="control-label col-lg-2">Quantity</label>
<div class="col-lg-10">
<input class=" form-control" required="required" name="group" type="text" id="output"/>
</div>
</div>
<div class="form-group ">
<label for="group" class="control-label col-lg-2">Critical Level</label>
<div class="col-lg-10">
<input class=" form-control" required="required" name="group" type="text" />
</div>
</div>
</form
when I select from dropdown All the information from i selected are output in the textbox THANKS IN ADVANCE.. SORRY FOR THIS NEWBIE QUESTION