-3
Good night!
How could I store the data of the variable "test" in "$variavelphp". As this code today the variable "test" is not accessible.
If it is not possible how I could access the value of the variable "test" in "teste2" in another part of the code.
var ref = firebase.database().ref('Profissionais').orderByChild('Nome');
//var u = 0;
ref.on('child_added', function (snapshot) {
var profissional = snapshot.val();
if (profissional.provider == "usuarios" || profissional.provider == "Facebook" || profissional.provider == "Firebase" || profissional.provider == "Usuarios") {
teste = "<tr><td>" + snapshot.key + "</td><td>" + profissional.Nome + "</td><td>" + profissional.Email + "</td><td>" + profissional.provider + "</td><td><a href='usuario.php?id=" + snapshot.key + "' class='btn btn-round btn-fill btn-info'>Consultar</a></td></tr>";
}
});
</script>
<?php
$variavelphp = "<script>document.write(teste)</script>";
?>
<script type="text/javascript">
var teste2 = teste;
alert(teste2);
</script>
Is not possible. Recommend
– Valdeir Psr
Practically the same problem I answered here yesterday: Save button click ID in PHP session
– Wallace Maxters