Note: Although I use a zipcode database with Dutch zipcodes, this question is country independent.
I have a database with every zipcode in the Netherlands +
You want to do something like this:
SELECT zipcode FROM zipcodes WHERE DistanceFormula(lat, long, 4.808855, 52.406332) < $range
It may be slow if your table of zip codes is large. You may also want to check out the geospatial extensions for MySQL.