i am using a dropdown in php which asks for user_category before creating the user. Upon selection of the category further text boxes are to be created dynamically depending upon the selection. I know how to get the selected value from $_POST but here i need it befor form submission.Pls help
You would need to use js. Either:
document.getElementById('elementName').value
or
document.formName.elementName.value
or
use jQuery.
Than if you need a response from a php script before submission you would need to use ajax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With