i have a application in which i want to get the zipcode or search based on the zipcode.when the users give the radius and a particular zipcode..i want to get the zip code based onthe radius .please tell me how to do that..
you have to use a formula to calculate the distance based on latitude and longitude. Once you have the distance you can use it to return all of the zipcodes within that radius. You should be able to find it online, otherwise I will post the code when I am in front of my home computer.
when the user gives a zip code and specifies the radius i should get all the place inside that radius.
my table consists of
CREATE TABLE `zipcodes` (
`zip` int(5) NOT NULL,
`ziptype` char(1) default NULL,
`city` varchar(45) NOT NULL,
`citytype` varchar(45) NOT NULL,
`stateName` varchar(45) NOT NULL,
`state` char(2) NOT NULL,
`area_code` char(3) NOT NULL,
`latitude` float NOT NULL default '0',
`longitude` float NOT NULL default '0'
based on this i have to calculate