Dynamic Dependent Select Box using jQuery, Ajax and PHP Database & Tables Create a database, like location_db. location_db consists of three tables countries, states, and cities. statestable has a relation with countries table and cities table has a relation with states table. countries Table:This table contains all the countries data. countries table SQL would like below. CREATE TABLE IF NOT EXISTS `countries` ( `country_id` int(11) NOT NULL, `country_name` varchar(30) CHARACTER SET utf8 NOT NULL, `status` tinyint(1) NOT NULL DEFAULT ‘1’ COMMENT ‘0:Blocked, 1:Active’ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; states Table:This table contains all the states data and country_id FOREIGN KEY. states table SQL would like below. CREATE TABLE IF NOT EXISTS…
Read More