You need to know some jQuery or other JS library, some PHP, and MySQL.
The first form field needs to have a submit action triggered when an item is selected, which will call your PHP into action to grab the items (from your database) that are relevant to that first selection and populate the second form field with this data while preserving the state of the first dropdown. As you have to use JS to perform the submit action, you might as well make use of AJAX techniques to make an XHR (XMLHttpRequest) and avoid a total refresh. Keep in mind that you cannot use conditional dropdowns when JS is blocked or unsupported.
How to watch Wimbledon 2015 live online: follow the tennis from your laptop or PC