UI Deploy

Curated, Short, Web UI Dev we Love.

Cascaded Dropdown in jQuery Ajax, PHP and MySQL

Hi Guys, We are getting good response for our simple tutorial on Cascaded drop down with jQuery, Ajax and PHP. In comments and emails I am usually asked on how to save the value back to database. So In this post we will see that. In our previous cascaded dropdown tutorial we were populating the drop down fields from database tables. Now in this post we will see how we can save the city, state and country ID’s in another table. An example would be on a user registration page user enters his details and then for location he selects the country, state and city. Ideally we only need city ID to be saved in “user” table as we can fetch state and country via SQL from primary tables. But we will save all three ID’s for city, state and country.

view source

Instagram Follow Adder