// April 11th, 2011 // 7 Comments » // Code, Featured
This tutorial was written after one of my readers requested help with creating a dependent dropdown menu for continents, countries and states. I hope this helps everyone out there, who like myself, have struggled with this in the past.
First you’ll need to create the connect.php file, explained here.
Next create the 3 mysql/php/json files used for:
1. gathering data from mysql,
2. storing the data into a json array for each of the combo boxes you’ll be using (Continent, Country and State).
(Please adjust the paths to connect.php (mentioned above) and all other files used in this example
accordingly and create the required tables in mysql as needed)
Start by creating the continentQ.php file, to gather the continent data:
(more…)