I have a simple dropdown list, whose values are from the DB.I am doing it as
$query = "SELECT id,location_name FROM misc_location";
if ( $result = mysql_query($query) ) {
$selectLoco = "<select name='selectLoco' id='selectLoco'>";
while ($row = mysql_fetch_row($result) ) {
$selectLoco .= "<option value='$row[0]''> $row[1] </option>";
}
$selectLoco .= "</select>";
}
But now i have a text box below the dropdown. So when user selects a dropdown item ,I need to pull a value corresponding the item selected and display in the text box.
Table : misc_location
id location_name time
1 Ben 7.00 am
2 Cat 8.00
Location : Drop-down user selects Ben , Text box below should display 7.00