E
E
Euaqa2016-03-17 18:21:07
PHP
Euaqa, 2016-03-17 18:21:07

Javascript + selector + Database?

There are 2 selectors:
1) Countries
2) Cities
There are two tables in Mysql:
1) Countries, each with its own unique ID
2) Cities that are related to countries by ID
Now, how to unload them from the database into selectors?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Zakharov, 2016-03-17
@Euaqa

In the first country selector, by changing, you make an Ajax query to the city table, filtering by country id, insert the received data into the second select

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question