Jump to content

change value according to selection


Recommended Posts

how can we change a value in another input field while changing the selection on another field.




if any name is selected in "name" field then his/ her stat recorded in database be appeared automatically on another input field or elsewhere.


is it possible?


i tried something on jQuery but could not reach anywhere...

Link to comment
Share on other sites

One solution would be to use Javascript to put a change event on the dropdown field, and the event handler gets the value that is selected and sends it to PHP with an ajax request, PHP looks up the corresponding value in the database and sends it back to Javascript, and then Javascript updates the field with the value from PHP.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...