Here is my problem:
1. I have a table in the database named tbl_menu. It has two fields namely description and price. There are two values in the table:
Description: Price:
Chicken Paa Meal 40
Chicken Petcho Meal 50
2. I want to load the price of the selected item from the drop down list box. Below is the screenshot of what i want to do.

Here is the code for displaying values in a select field.
Code: Select all
<?php
$queryMenu = "SELECT * FROM tbl_menu";
$resultMenu = mysql_query($queryMenu);
echo "<select name=\"d1\" size=\"1\" class=\"formFieldsDropDownCode\" id=\"dl\" tabindex=\"2\">";
while($row = mysql_fetch_assoc($resultMenu)){
$showName=$row['description'];
$price = $row['price'];
echo "<option value=".$showName.">".$showName."</option>";
}
echo "</select>";
?>Please help anyone. Thanks in advance.