0
Hello friends I need a gallows here next:
I receive a table with the values inside php I need to take the full table and send via the form via post I am not able to send the tebela putting there in the value php
below put first the code I receive the table and just below this the form
<?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>
Do you want to send each row of this table all together? Or individual? And where do you want to send it? This way you’re doing it never works.
– Willian Coqueiro
All together what’s inside php I want to put the value there in input !
– Hemerson Prestes