How to create a dropdown select menu in CI so that if I select a category, a sub category will appear on the same page without refreshing the browser?
You should do it via AJAX and retrieve the subcategories. Have a ready subcategories or dropdown.
Append the values return by PHP into the dropdown.
Some pseudo-code:
$.each(data, function(key, value) { $('#subcategories'). append($("").attr("value",key).text(value)); });