I need to create a log in page for new customers, where in they provide their address in the US based on the zipcode. Essentially, if a user fills in a zip code, it should automatically populate the city and state.

For some situations, I also want to create a customised table of addresses like if a user gives its company's name then I want to provide 'valid' additional list of values for the company's floor and cube numbers.

Any guidance on writing this code or ready made available code for this would be welcome.


you'll need a record of all zip codes with their associated city and state. There's a lot. If customers don't have a password or anything to log in with and this just keeps track of them temporarily like a shopping cart or something, then look into sessions. Good tutorials on phpfreaks.com

It sounds like from what you want to do, the best way to go about this is storing info in a database (like MySQL) and you'll need to have all the data entered, and possibly use JOINs to match zipcodes with cities and businesses and such.