Hello friends, I need a strength here:
I get a table with the values inside the php I need to get the whole table and send it via the form via post I can not send the tab by placing there in the value php
Below I put the code that I get the table first and then the form below
<?php
$array_dados = json_decode($_POST["json_dados"]);
$total = 0;
// CABEÇALHO
echo '
<table width="95%" border="1" align="center">
<tr>
<td width="26%"><div align="center">Nome</div></td>
<td width="41%"><div align="center">Preco</div></td>
<td width="33%"><div align="center">Quantidade</div></td>
<td width="33%"><div align="center">Subtotal</div></td>
</tr>';
foreach($array_dados as $obj)
{
echo '
<tr>
<td><div align="center">'. $obj->nome . '</div></td>
<td><div align="center">'. $obj->preco . '</div></td>
<td><div align="center">'. $obj->qtd . '</div></td>
<td><div align="center">'. $obj->subtotal . '</div></td>
</tr>';
$total = $total + $obj->subtotal;
}
echo '
<tr><td colspan="4"><div align="center">Total: '.$total.'</div></td></tr>
</table>';
?>
<form method="post" action="finaliza.php">
<input type="hidden" name="tabela toda" value="AQUI_A_TABELA">
<input type="submit" value="Finalizar Pedido">
</form>