473,749 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

world database of country state and city

45 New Member
Hi everyone,

I need the world database of country state and city. Actually i have three drop down option in my project in 1st drop down country name should come from database and 2nd drop down state name should come from database according to country and in 3rd drop down cities name should come from database according to states.

I have tried many search engine but i could not get any proper info regarding this i mean some time i get whole country name or some time i gat only cities name that i do not want. and somewhere is paid.

If you have any info regarding free database then plz tell me the details.
i will be very grateful to you...

thanks

Tokcy
Apr 17 '09 #1
7 9244
Ciary
247 Recognized Expert New Member
do you have three different databases or 3 different tables within one datebase. in the first case its very simple. you simply use a select statement after you post one drop down list.

Expand|Select|Wrap|Line Numbers
  1. <?php if(isset($_POST["country"]){
  2.     $query = "SELECT * FROM states WHERE country =".$_POST["country"]
  3.     }if(isset($_POST["state"]){
  4.     $query2 = "SELECT * FROM cities WHERE state=".$_POST["state"]
  5.     }
  6.  
after this: execute the queries and use the resulting array to fill the drop down lists
Apr 17 '09 #2
Markus
6,050 Recognized Expert Expert
@Ciary
I think it's the database that he's asking for - not how to query it.

Check out geo world map (bottom right); it may or may not be what you're looking for.

I'll move this question to misc because it is not specifically about PHP.

Moderator.
Apr 17 '09 #3
Markus
6,050 Recognized Expert Expert
This looks even more promising.

- mark.
Apr 17 '09 #4
tokcy
45 New Member
I am not looking for php code i ma looking for country state and cities database of world...
Apr 18 '09 #5
Markus
6,050 Recognized Expert Expert
@tokcy
Posts #3 and #4 should be of interest then.
Apr 18 '09 #6
tokcy
45 New Member
post #4 is not free, already i have checked and in post #3 there is no such type of link or option to take a any kind of database for world state and city...

thanks
Apr 18 '09 #7
Markus
6,050 Recognized Expert Expert
@tokcy
Bottom right. GeoWorldMap.

It's not in SQL format, you'll have to do some work to convert it.
Apr 18 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1512
by: SuryaPrakash Patel via SQLMonster.com | last post by:
Dear Reader I am trying to design a database. How can I make best Judgement that Indexing (which I am trying to fix during Diagram Desingning process)is ok. I am able to identify the best candidate for the indexing. Below is the details I want to understand: Area ZIP
6
1537
by: Noozer | last post by:
I'm developing a database using MS Access and have come across a problem. The majority of my database is pretty straightforward "many to one" relationships. I have one relationship that is backwards though... This is probably easier to diagram than to describe... Countries -M to1-> Provinces - M to 1-> Cities <-M to 1- Call Centres With the above relationships I am having trouble implementing a simple data entry interface. Basically...
5
2202
by: hfk0 | last post by:
Hi, I'm new to ASP.net, SQL Server and visual studio.net, and I'm having problem inserting and storing data from a web form to a SQL database. I created a simple ASP.NET web form, a simple SQL database, a database connection (using the SQlDataSource Web Control from the Toolbox), and created the following stored procedure in Visual Studio.Net 2005:
1
3512
by: greg.scharlemann | last post by:
Does anyone know where I could find a complete city and state database for MySQL? I've looked at the Zip Code data on the census website, but don't know the best approach to get a .dbf file into MySQL. Preferably someon has already done this? Thanks, Greg
10
22954
by: somaskarthic | last post by:
Hi In my php page , there is a user registration form. Here the user has to select the country, state, city from the drop down box. How this can be handled in php? If a country is selected in a drop down box , its corresponding states should be populated in the state drop down box. If a state is selected , its corresponding cities should be populated in the city drop down box. Where all these data has to be stored and retrieved. What...
5
9421
by: jakas | last post by:
Hi In my php page , there is a user registration form. Here the user has to select the country, state, city from the drop down box. How this can be handled in php? If a country is selected in a drop down box , its corresponding states should be populated in the state drop down box. If a state is selected , its corresponding cities should be populated in the city drop down box. Where all these data has to be stored and retrieved. What type...
3
1878
by: rizwanrazzaq | last post by:
Hi friends here is my coding.. but i m facing one problem .. i used both mathod SQL mathod and open Record Set. but in both i m getting error massage can anyone help me out regarding thi. Please Please Please help me out how i can solve this problem. Error : ADODB.Recordset error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. /grc/registration.asp, line 85
2
3577
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
14
3466
by: rashmidutt | last post by:
hello sir i am making project on vb.net language..and project is on hospital management..its major project..and too many fields are present in its data base..i was connecting data base in forms but there is coming error..SIR PLEASE SORT OUT ERROR FROM MY COADING..what can i do to solve this error please give me sugession or if you can send me coading for adding information from form.than i will be thankfull to u..i have written all fields which...
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4709
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3320
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.