The traditional and less user-friendly way is to put up a form with just the states, when submitted a second page displays all the cities in that state and finally a third page displays all the golf courses.
I want to make it so that a user selects a state from a dropdown list, after selecting the state I want another dropdown list with the cities of that state,
That is often termed a "linked drop list" or "linked select boxes" or "linked drop down menu php"
Searching for those terms will turn up a way of achieving this on the client. Essentially, PHP creates the full array of states and cities, turns them into JS arrays and sends the lot to the client - heavy, but once loaded the sorting is instantaneous.
Another way to do this is to use Ajax to refresh parts of the page.
Which you choose may depend on;
a) your skills
b) whether you want your site to work with JS turned off
c) how many states/cities/golf courses you have
I presume this is what you were asking about rather than how to build up the sql statements ...