I need a script written, what the script needs to do is a user enters their location (through an address or zip code), a max price and max distance they are willing to travel. They then continue to select interests such as restaurants, sport, holidays, etc. A database of deals is then queried and the deals relevant to the users input are presented.
The deals database table consists of things such as ID, Name, Address, Photo, Category, Longitude and Latitude.
What I need done:
1. Have the users location converted into coordinates through Yahoo's Geocoding API.
2. Query the database and find deals that are within the specified distance/radius this can be done using the Haversine forumula, it works by using the coordinates of the user and the coordinates of the deal to find deals within a given radius an example of use can be found here: [url removed, login to view] its quite straight forward.
3. Only return deals under the max price set by the user.
4. And only return deals that are under the specified categories eg. if they selected sports and restaurants only return sports and restaurants and ignore other deals, also the ability for the user to select multiple categories.
Thanks a lot for reading