Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/irfanghuori/dynamically-selector

Dynamically select country, state and city.
https://github.com/irfanghuori/dynamically-selector

api country-city-selector country-selector dynamic-city-selector dynamic-country-selector dynamic-memory-allocation

Last synced: about 2 months ago
JSON representation

Dynamically select country, state and city.

Awesome Lists containing this project

README

        

## _Country State City Dropdown _

## Installation
- 1 - Download API https://github.com/IrfanGhuori/Dynamically-Selector/archive/refs/heads/master.zip
- 2 - Upload the API zip folder to your web server public_html directory, using FTP or File Manager.
- 3 - Create a MySQL database for API or use an existing database for API.
- 4 - Ran installation file path: www.yourDomain.com/api/installer/
- 5 - After installation delete installer folders

## Uninstall API
- 1 - Go your phpMyAdmin
- 2 - Dropdown 4 columns Name "city","country","key","state"
- 3 - Delete Folder name -> App folder, Dist folder, and file api.html

## API Key
- 1 - Generate your free API key and save it on a notepad!
- 2 - Paste your API key in the Ajax script after the URL path
Example: URL: '../api/app/api_countries.php?key=YourKeyHere'.
- 3 - If you forgot the copy key. You can copy it from your database column name "key".

## Use API
- 1 - Copy the HTML code.
- 2 - It is designed with Bootstrap 4, so you can easily customize it.
- 3 - Add the fetcher.js after the jQuery library.

Watch Demo

```sh

```
- 4 - Copy the Ajax code and place it after the jQuery library.

```sh

$(document).ready(function () {
jQuery.ajax({
type: 'post',
url: '../api/app/api_countries.php?key=Your-API-Key',
success: function (countries) {
if (countries.status == "connected") {
$.each(countries.data, function (ind, co) {
jQuery('#country').append("" + co.name + "");
});
} else if (countries.status == "error") {
$('.alert-danger').fadeIn();
$('#message').append(countries.message);
}
}
});
});

```
- 5 - Copy the HTML code and place it where you want it to appear.

```sh




Country

Select Country





State

Select State





City

Select City




```

> Note: `Videos tutorials are available in this project folder download and watch them for easily use this smart API
> Suggest me for it or if asking something about it

[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)

[dill]:
[git-repo-url]:
[john gruber]:
[df1]:
[markdown-it]:
[Ace Editor]:
[node.js]:
[Twitter Bootstrap]:
[jQuery]:
[@tjholowaychuk]:
[express]:
[AngularJS]:
[Gulp]:

[PlDb]:
[PlGh]:
[PlGd]:
[PlOd]:
[PlMe]:
[PlGa]: