0

I've seen that this question has been posted a couple of times but nothing specific enough for me to use.

I have a form (In a .php file), with a Zipcode and City textfield. I also have a seperate database which holds all zipcodes and cities for my country. (Zipcode in column 1 and city in column 2)

What i would like is that whenever a user inputs either city or zipcode the other field updates/populates automatically based on the database.

I've tried looking for a jquery / ajax solution, but i haven't found one yet.

Cheeso
  • 189,189
  • 101
  • 473
  • 713
MadsK
  • 119
  • 4
  • 11

1 Answers1

2

AJAX can do the trick. You may try something like this: LINK.

I suggest you to use jQuery, it's much cleaner code for AJAX than coding it yourself.

mdrg
  • 3,242
  • 2
  • 22
  • 44