Search the Community
Showing results for tags 'address'.
abigail posted a topic in Effortless E-Commerce with PHP and MySQL (2nd Edition)I'm working on an online store application. I'm working on the part that will get Customer's shipping address. I also want to get name, email, and phone number. My question is, what is the best way to validate all of these, especially the address. I know this is a general way of stating the question, so to clarify, this is what I am thinking. I have two goals: 1) all the data is valid in the sense I can store it in the database. 2) I want to try to make sure it is a real customer, not a scammer, so I would like to make sure everything is in a valid form. Such as a zip code is only 5 digits plus 4. A phone number is only 10 digits, etc. Is it reasonable to check if the zip code is valid for that state? I don't think it needs to be perfect. It is just for doing some basic checking before passing it through to the credit card section.