Are you only accepting US zip codes?
Justin
-Original Message-
From: Aaron Todd [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 08, 2004 8:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Zip Code Fields
Just curious, but what kind of field is everyone using to store a Zip
Code.
I
With MySQL you could do this:
MEDIUMINT(5) UNSIGNED ZEROFILL
Most databases (I think) would have an equivalent of this if you're
using something else.
Chris
Aaron Todd wrote:
Just curious, but what kind of field is everyone using to store a Zip Code.
I set mine to Medium Integer with a max of 5
you can store it as an integer, but make sure you use a proper print function
to display it later that preserves the 5 digits, such as:
echo str_pad($zip, 5, 0, STR_PAD_LEFT);
or something like that.. I take it you have no plans to store 10 digit zips?
-Micah
On Wednesday 08
Doesn't the USPS have some online API for checking Zip Codes? Not sure but I thought
I read about it somewhere.
look here
http://www.usps.com/webtools/
-Original Message-
From: Justin Palmer [EMAIL PROTECTED]
Sent: Sep 8, 2004 12:25 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Zip