Dropdown based on another

Hi

I have two table one for countries and one for cities (mysql database)

i want to create drop down based on another drop down

when select country from one the another one display cities of this country

??

Are you looking for CSS advice or PHP / MySQL advice here?

To get the cities returned for ever country just do a second MySQL query inside a while loop of all the returned countries, with the returned country in the WHERE clause of the second query.

i need php/mysql

i do while loop for 2 dropdown to get data from database

but i need to get cities according to countries

now i get all countries and cities

Do the cities while loop inside the countries while loop and put each country from the first while loop into the WHERE condition of the second cities while loop.