What I want to do is have the user input their Zip code and select a radius (in miles). The script would then search for database entries where the zip code matched that search criteria. I'm looking for some assistance on this. I've never worked with zip codes much. Is there a script out there that does this? Would anyone like to take a stab at it? Thanks.
ZIP Code/Radius Search Script
Depends on how accurate you want it to be. If you're not too concerned and you're happy with about .5 to 1 mile of fuzzy-ness, then you can download the zip data off the the US gov's census web site (2000 edition data should be up there).
If you need more accurate data, then the post office is the way to go. They sell CDs with the USA's zip code data. Last time I checked, the prices ranges from $300 to $800 depending on how much data you needed, but its been a year or so since I last researched.
But really what you need (and the two places I mentioned above should have) is you need a chunk of data that describes a zip code and its lattitude and longitude position. I recommend putting this data in a database.
There's a set of equations floating around on the 'net (sorry, don't have any links) that calculate the distance between to sets of lat/long coordinates. There may be another set of equations for figuring out lat/long coordinates that are within a radius, but if you don't find any, its a matter of doing a little bit of math/trig. I haven't played with "zips within a radius", but its possible the database engine might have enough math smarts to pull off doing the calculation(s) in the query and then returning all zips that are within the lat/long range.