Re: to many addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



aother option here might be to build a set of associative arrays together that cover all the possibilities of the address endings ie

$addresses = array('Road' =>'Road','Rd', 'Street' =>"Street','Str','St'); etc and run thru a little checking code to convert those possbibities into one defined format. Then you end up with consistent data...

bastien

From: <tg-php@xxxxxxxxxxxxxxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
CC: <Matthew.Perry@xxxxxxxxxxxx>
Subject: Re:  to many addresses
Date: Mon, 27 Dec 2004 14:54:22 -0500

Sounds like pre-loading the addresses into javascript or something is also going to be just as cumbersome and that's the only other method I can think of to have the addresses auto-complete realtime. Yahoo has a little helper app that works with Yahoo mail to auto-complete names from your email address book like Outlook or another non-web based email package would, but even that kind of solution would have a lot of client side overhead.

Here are a couple of thoughts though:

Thought 1:
Have a 'lookup address' page where they enter their address and on the backend you strip out things like 'rd' 'road' 'ave' 'avenue', etc and just search for the base name of the street and maybe ignore city if a zip code is entered (because sometimes the city name might not match the city name of the zip code... in our area, someone might enter Baltimore, MD 11111 when the post office name is reall Catonsville, MD 11111. Zip code should always match, but the city may or may not.


Take the results of the base street name + zip code (and/or city/state.. state should match the zip code unless it's a border town that's confused.. stupid human error) and display a list of addresses for the user to select, OR enter the new address (already pre-populated from what the user entered)


Thought 2:
Have them enter a few things like city and state and do a wizard style step by step to narrow down your 20,000 to a handful they can select from.



I think I like the first one better. You might audit it on the back end though to make sure that people actually entered a unique address and didn't just go "Yeah whatever" and click "Ok" to the add new address box. Or maybe require them to enter it again by hand... something to keep them from being too lazy and always entering a new address.


Good luck Matt!

-TG

= = = Original message = = =

We have about 20,000 addresses in our database.

If my users are filling out a form that requires an address already in our
database I have to make sure they enter it in a format already in the db
(such as "West Road" not "West Rd.").  I have to also allow for new
addresses.

Obviously having a dropdown of 20,000 entries and a second field called
"Other Address Not Here" will not work.

It would also be nice if the field auto fills with suggested addresses from
the database.

Does anyone have advice on how I should do this?

I have been scratching my head over this problem all morning.

-Matthew


___________________________________________________________ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux