View Single Post
Old 12-10-2003, 06:31 PM   #8 (permalink)
ratbastid
Darth Papa
 
ratbastid's Avatar
 
Location: Yonder
Quote:
Originally posted by s1em
I wonder if it's something the postal service provides via a web service or something?
Both UPS and USPS offer such services.

Quote:
Originally posted by mpedrummer2
What I need to know is how to connect to the database to use that information. I can do it in PHP, but I don't want to refresh the page in the middle of the process.
You don't have much choice, I'm afraid. Unless you want to populate a massive JavaScript data structure with ALL that data, you're going to have to hit the server for it. Fortunately, you can do it in a way that's pretty transparent.

Add to the input tag an onChange="form.submit()". And then have the PHP smart enough to know when the JUST zip has just been submitted. Do your db lookup, and generate the page again, populating the forms with the values. If the server's fast enough, the user won't even notice.
ratbastid is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54