The "right" way to do this is to get the latitude/longitude of the user's Zip code (and how do you make this work in countries without zip codes or equivalent?) and then get the minimum distance from that latitude/longitude to the lat/long of the zip code of each store.<BR><BR>The math isn't trivial (though not that hard...just a little spherical trigonometry), but except for Alaska you can approximate the distances using simply pythagorean formula. And that's simple enough you can even put it into the actual SQL query so you get results already ranked by approx. distance.<BR><BR>NOW....<BR><BR>The *big* problem is getting the database that has the lat/long of each zip code. I dunno where you get that from. The post office???<BR><BR>Note that even this isn't foolproof. Zip code areas are big enough that somebody living at the southern edge of one could easily be much, much closer to a store at the northern edge of an adjacent zip code than to a store that is actually in the same zip code! (Certainly true in my own case for most stores.)<BR><BR><BR><BR>
To show geographic location use a Geographic Infor
There are several commercial products that provide the ability to map the geographic location of information.<BR><BR>The one I develop with is called ArcIMS a product of ESRI www.esri.com. It uses a Java Servlet and supports several development environments including ASP, Cold Fusion, and Java.<BR><BR>You can even use it as a Component for Visual Basic applications.<BR><BR>Be forwarned. GIS is a science/skillset all to itself. There are several consltants who specialize in developing GIS applications. The company I work for is Geographic Technologies Group (www.geotg.com), but there are others who are just as good. ESRI has a whole list of their partners on their website.<BR><BR>AutoDesk (the makers of AutoCad) also have a product called MapGuide that can be used to serveout AutoCAD Map files that include attribute information.<BR><BR>MapInfo is another company with a web product.