Jump to content

get select value using html and php


Recommended Posts

You can't run PHP like that onchange. That runs Javascript code, not PHP. If you want to use PHP to change something you will need to have Javascript use AJAX to send the request to PHP with the value of the element, PHP can do whatever it needs to do and return a result, and Javascript will need to get the result and update the page. Check the AJAX reference.

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...