Pull down menus for State -> County -> City from MySQL database [closed]

I’m trying to make an interactive drop down for State / County / City / SIC (choice of 5 SICS) using MySQL and PHP…

I can’t find any examples that work from this data.

PULL DOWN 1

select distinct state from data20251;

PULL DOWN 2

select distinct county from data20251 where state = 'xx';

PULL DOWN 3

select distinct city from data20251 where state = 'xx' and county = 'xxxxxxxxxxx';

PULL DOWN 4

select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123451';
select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123452';
select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123453';
select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123454';
select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123455';

If anyone can help me I would really appreciate it.

Thanks!