mugitty Posted July 16, 2004 Share Posted July 16, 2004 I'm working on adding the phone match feature, but need help with some PHP. MaxMind looks for the area code and exchange in the customer's phone number and doesn't seem to care whether it's presented as 123-456 or 123456. I need some guidance on how to mask the phone number that the customer enters so that the first 6 digits are pulled out to submit to MaxMind. Keep in mind that the customer may enter their number in a variety of different ways - (4 come to mind: 800-555-1212, 800.555.1212, 8005551212, 800 555 1212). If someone could show me how to select the first 6 DIGITS that appear in a customer's phone number, regardless of the format they use, I would be forever grateful! Additionally, this customer phone match feature as returned from MaxMind is very sensitive, so the exchange being part of the equation could possibly result in "NO" match responses for perfectly valid phone/address combinations - it would be interesting to explore whether data for this field could be submitted to MaxMind that only included the area code and still return a useful result from MaxMind. An actual example: My home address is in Benton City and I have a 628 telephone exchange for my home phone. When I submit a test order, I get a "NO" on the phone number match. I assume this is because the Post Office puts us in Benton City, but the telephone company considers our exchange to be a Kennewick exchange. If I leave the same address and change the phone exchange to a known Benton City number, the phone match magically changes to "YES". Quote ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.