Is there a way to send data with php through POST; in the same way that is done through the action of the teg form.
That is, send data from page A to B and be directed to page B accessing that data.
Is there a way to send data with php through POST; in the same way that is done through the action of the teg form.
That is, send data from page A to B and be directed to page B accessing that data.
You can use a form full hidden:
Page A:
<b>Variável AA:</b>: <?= $aa ?><br />
<b>Variável AB:</b>: <?= $ab ?><br />
<form action="paginaB.php" method="post">
<input type="hidden" name="variavel_aa value="<?= $aa ?>">
<input type="hidden" name="variavel_ab value="<?= $ab ?>">
<input type="submit" value="PROXIMA">
</form>
Page B:
<b>Variável AA:</b>: <?= $POST['variavel_aa'] ?><br />
<b>Variável AB:</b>: <?= $POST['variavel_aa'] ?><br />
You can do this with session variables. On page A:
$_SESSION['variavel'] = 'Valor da variavel';
On page B you capture the passed value:
$var = $_SESSION['variavel'];
Only one thing: at the beginning of the pages that will use this one should put the following:
session_start();