-1
I do not know if it is possible, because I know that javascript is client and PHP is server. But I would like to take the return that comes from ajax (after running PHP and returning) and store it in a PHP variable. Example below;
<script>
$.ajax({
url: 'assets/php/advantage-club.php',
type: 'POST',
dataType: 'html',
data: {
"pass": "3d1fa6s0df51as8das6d2f1as036f15as8df90"
}
}).done(function(r) {
AQUI EU TENHO O RETORNO,
QUERIA COLOCAR O RETORNO
NUMA VARIAVEL DO PHP PARA TRABALHAR ABAIXO
});
</script>
<?php
echo '<pre>';
var_dump($r);
echo '</pre>';
?>
Would this be possible?
Oloco, my ! Why this need to make this display in PHP ?
– Gato de Schrödinger
curiosity, what I need I can do via for() and display below. But I was curious to understand how I can’t play the value for PHP again. @Gatodeschrödinger
– Leonardo Jr
I answered below... but if you need in PHP to call another php page to work with the result of this second page, then instead of using ajax, you use Curl. Check on your server or wampp, xampp for life if the Curl extension is active.
– Will Knippelberg