I been finding for long unable to search for it.. I have a dropdown select option call from mysql database.. I wanted when the user choose a employee from the option.. when selected.. it's list out the data from mysql database the employee data that is selected. here the code..
<select value="employee" selected="selected"> Select a employee</option>
<?php
$query = "SELECT * FROM users";
$result = mysqli_query($link,$query);
while ($row = mysqli_fetch_array($result)) {
$fname = $row["first_name"];
$lname = $row["last_name"];
echo "<option value'" . $fname . " " . $lname ."'>" . $fname . " " . $lname . "</option>";
}
?>
</select>
sorry i'm new to js.. how do I get the data from selected value?