Just wondering if anyone has a good function , or knows of one to return to city / state from a zipcode entered.
Thanks
Just wondering if anyone has a good function , or knows of one to return to city / state from a zipcode entered.
Thanks
well that really depends what country your talking about doesnt it? maybe do a search over at www.hotscripts.com
thorpe, seeings as how Sayian is in Austin Texas, and refers to "state" and "zipcode", I'd say they're in the US, and are looking for something specific to the US...
Hey Sayian, there's been a lot of discussion about it here too, so search these boards. You'd basically need a database with all of the Zipcode/City/State combinations. From there, it's a matter of doing the DB lookups. There's plenty of resources out there that have already done the DB legwork, so use your Google, Hotscripts and these forum searches, and you should be able to find what you're looking for.
Here's a blog post about how to tackle this problem using AJAX: http://nerdbombs.wordpress.com/2010/11/03/zipcode/
http://www.free-zipcodes.com/
I've used this database before with a lot of success. Its a little of out of date. Its data is from 2006, but its pretty complete.
Once you import the data into your database, you can do a SELECT on the zip code and return the city and state.
I'd check and see if the Postal Service, or perhaps Google, already had an API for this.
EDIT: and LOL Kudose, here we are on some 5 year old topic a noob drug up Sops, I bet that 2006 data would've been real current for the O.P. at the time