Hello Everyone,

Can you suggest me for Any Script or snippets of dopdown value given to database using jquery and ajax in php file.

Thank You.

Recommended Answers

All 4 Replies

dopdown value given to database

What does that mean? You sure you don't have it the other way around? Do you mean pull values from a database and populate a dropdown menu?

Means pull value directly fetch by database.

Member Avatar

It's no different from how you would a pull data from the database in a normal $_POST php file. All you do is use $.ajax instead.

Member Avatar

If you're just getting data and not changing it on the server, use $.get (or $.ajax with GET) or even $.getJSON - depending on how you get your info from the server. Do not use $.post (or $.ajax with POST) unless you're making changes on the server, e.g. insert, delete or update (or changes to a file etc).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.