I know the question may have already been asked, but in no case has it solved the problem I have, I need to get the value of a JQuery variable and pass it to one in PHP, the variable in JQuery is being created like this:
// Gerando números para cada ciclo do processo
if( $("#LinkDocumento").val() != "" && $("#Etapa").val() == 1) {
var Numero = Math.floor(Math.random() * 11);
} else if ( $("#LinkDocumento").val() != "" && $("#Etapa").val() == 2) {
var Numero = Math.floor(Math.random() * 11);
} else {
var Numero = Math.floor(Math.random() * 11);
}
And I tried to play the value in a PHP
variable like this:
$EtapaForm = "<script>document.write(Numero)</script>";
But I'm not getting it, the result looks like this:
The variable I am trying to retrieve will be passed as a parameter to another form that is being fetched through the variable #LinkDocumento
, that is, this variable brings me a path from the bank.