I'm here with a difficulty, I'm getting a value that comes from a JQUERY request to be presented in an input form, with the code:
HTML
<input type="text" id="valor">
With this TAG I can retrieve the value I want in HTML, my problem now is how I'm going to pass it to a PHP variable.
I already tried to use this method, it follows the code:
JAVASCRIPT
var valor = document.getElementById("valor").value;
Next in PHP I try to retrieve it this way, follow the code:
PHP
$varphp = "<script>document.write(valor)</script>";
But I could not, what can I do to fix the code? I need the code that appears in the TAG input of the form to be converted to a PHP variable.