i already search for this question but the result is a litte confusing because today is my first time to encounter ajax and most answer is ajax. so i decided to post a question which is my work and trying to have someones help from here to guide me about ajax. this is for my project need some help please
this is my query for getting the values from database and display it to my dropdownlist
<?php
include('config.php');
$sql="SELECT food FROM menu";
$lists=mysql_query($sql);
?>
this is my dropdown list... i fetch data from my database to have my values in dropdown list
<select name="fname" id='mySelect' value='Foodname'>
<?php
while($food = mysql_fetch_array($lists)) {
echo '<option value='.$food['food'].'>'.$food['food'].'</option>';
}
echo '</select>';
?>
now i want to show the price of the selected food in the dropdown list.. i want it to show in input text so i am able to edit it if i want to
<input type='text' class="form-control" name='prc'>

