Dynamic drop down list for different countries, states, geographic locations?

前端 未结 1 1526
长发绾君心
长发绾君心 2021-01-01 07:54

I am having my users to enter their city, state, and country. But my dilemma is how to manage it dynamically so that I can control what is entered while having correct spell

相关标签:
1条回答
  • 2021-01-01 08:22

    Ok so after several hours I've written an application based on the MySQL world database: MySQL world Setup

    The code for the entire application is way to large to put in an answer so I'll provide Pastebin links for each seperate file, aswell as a link to a working example of the script and a download link for the Zip archive.

    I'm sure the code can be improved further, but I'll leave that up to you.

    Requirements: MySQL world Database / jQuery

    1. index.html: index.html
    2. style.css: style.css
    3. country.js: country.js
    4. dbconnect.php: dbconnect.php
    5. get_country.php: get_country.php
    6. get_states.php: get_states.php
    7. get_city.php: get_city.php
    8. get_data.php: get_data.php

    Working Example:

    1. Country, State, City selector

    Zip Archive Download (DB NOT included!):

    1. selector.zip (currently down)
    2. Virus Total Analysis of above file

    I'm working on an updated script due to the popular demands on this question. It will be added soon.

    0 讨论(0)
提交回复
热议问题