Please explain what exactly your question is - you've posted some code, but from just a bunch of code and a few words it's hard to understand why you are posting this and what you exactly want to know.
I already populate category and subcategory drop down. Now what i want when I click on subcategory corresponding company details will come from company database.I enclosed one image.like that table I want a company details after click subcategory
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad: