Selecting country name from country drop down based on the visitors country location will increase visitors user friendliness for your web forms, Let us create How to create Auto Select Country Name based on visitors location based on Country Geo location and IP Address. When Loading a page detect country name and locate a country flag based on country location.

Create a Free Account for IP to Location API from http://ipinfodb.com/ip_location_api.php to get a API Key for IP to Location. and get the Country Flag from ip2Location database.
using the URL: http://www.ip2location.com/images/country/{ COUNTRY SHORT CODE} .gif
and Process the code as per the following:

using the URL: http://www.ip2location.com/images/country/{ COUNTRY SHORT CODE} .gif