Forum Moderators: phranque

Message Too Old, No Replies

filtering feature

results based on database query

         

brdwlsh

4:01 pm on Oct 18, 2007 (gmt 0)

10+ Year Member



I usually find the answer to my question on this site before having to post. in this case, i'm not entirely sure what to search on.

a client requested a feature on his site -- the user would enter some information (address, name, zip code, etc) into a form and results would be displayed after 'submit' was clicked. results would be based on zip code.

example;

WHAT WIDGETS ARE AVAILABLE IN YOUR AREA
complete and submit the form to find out.

name: brd
address: 123 any street
zip: 99999

results:
BLU WIDGETS ARE AVAILABLE
Contact: 123-456-7890

i am...
Proficient in HTML
Moderate in SQL
PHP scares me (allegory of the cave?)

what technology can be used for this, and more importantly what is this called? i'd like to search around if i had some keywords.

thanks,
brd

coopster

4:17 pm on Oct 18, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Often referred to as a "dealer locator", "locate by zip code", or something along those lines. You are correct in that most solutions require a database where two tables are joined in an SQL statement and executed to return a result set based on submitted form values. You need some form of server-side processing to handle the submission, evaluation, execution, result formatting and response to the user input.

LifeinAsia

4:19 pm on Oct 18, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



more importantly what is this called?

Um, this is a brand new technology being developed in secret- code name: "search" :)

Maybe I'm missing something, but it seems pretty straightforward:
1) You make a database of companies and contact information and widgets that they offer
2) You make a search form where the user enters data
3) You make a backend that takes the address and finds the nearest companies that offer that widget then returns the contact information

The only "technology" I can think of is geocoding, which is the process of mapping physical locations to lat/long coordinates.

brdwlsh

6:03 pm on Oct 18, 2007 (gmt 0)

10+ Year Member



'dealer locator', thanks coopster--i'm finding a lot on the subject now.

now what is straightforward in logic can be executed on the backend.

jtara

6:44 pm on Oct 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm sure you can find plenty of free scripts to do this.

It's certainly not as easy as it first sounds. You need to find dealers "near" the user. It gets more complicated the more precise you want to be.

If only to the zip-code level, not so bad. You can probably get a database of zipcodes and the geographical coordinates of their centers pretty easily.

But most good dealer locaters list dealers ordered by distance, even within your same zipcode. This requires a geolocation database or service, that can convert an address to a latitude and longitude.

Anyway, it's such a common problem, that there will be many packaged solutions available.