We are going to see how to show state name and country name in the same text field.When user types the city or state name in the textbox, It will make ajax request to apache server, where PHP will make connection to MySQL database and get the city and state names based on user entered data in the textbox. Then Apache server return those response, finally jQuery UI autocomplete will show the city and state name as suggestions to select.
jQuery UI PHP