I am trying to populate second dropdown list based on first dropdown list selection using Ajax, jQuery,PHP and MySQL. the problem is the options in second dropdown list just app
You should edit your script into this..
<select id="result">
<option value="select">Please Select From The List</option>
</select>
You are setting $('#result').html(data);
in the main file.
result
should be the id of the HTML select
element, you used it as id for the an option
element.
(You are appending the values into the option
element, which doesn't create new HTML elements, but they should be inserted into the select
element.)