PHP Dependent Drop Down Tutorial: Create dependent dropdowns using jQuery AJAX

Recommend this page to a friend!
  Info   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-07-03 (2 months ago) RSS 2.0 feedNot enough user ratingsTotal: 76 All time: 9,779 This week: 227Up
Version License PHP version Categories
tutorial-dependency- 1.0.0The PHP License5HTML, PHP 5, Databases, AJAX
Description Author

This package provides tutorial code for you to learn how to create dependent dropdowns using jQuery AJAX library JavaScript code.

It provides an example code on how to get a list of countries from a class to display in form select input.

The package also shows to use AJAX requests to connect a select input to show the selected country states and another select input to show the state cities.

The list of supported countries, states, and cities is retrieved using a database accessed using the PHP PDO class to access a MySQL database with tables that contain that information.

Picture of Channaveer Hakari
  Performance   Level  
Name: Channaveer Hakari <contact>
Classes: 6 packages by
Country: India India
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Files folder imageapi (2 files)
Files folder imageassets (2 directories)
Accessible without login Plain text file config.php Conf. Configuration script
Plain text file Country.php Class Class source
Accessible without login Plain text file db.php Example Example script
Accessible without login Plain text file demo.sql Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  api  
File Role Description
  Accessible without login Plain text file city_by_state.php Example Example script
  Accessible without login Plain text file state_by_country.php Example Example script

  Files folder image Files  /  assets  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (3 files)

  Files folder image Files  /  assets  /  css  
File Role Description
  Accessible without login Plain text file style.css Data Auxiliary data

  Files folder image Files  /  assets  /  js  
File Role Description
  Accessible without login Plain text file cities_by_state.js Data Auxiliary data
  Accessible without login Plain text file jquery.js Data Auxiliary data
  Accessible without login Plain text file states_by_country.js Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:76
This week:0
All time:9,779
This week:227Up
For more information send a message to info at phpclasses dot org.