I have a table with data of a certain equipment, above the table has a field where the number of the equipment is inserted and quantity, the other information comes from the bank through the equipment number. In the last column of each table there is a button to exclude this line, but for that effect to occur it is necessary to reload the page. But once the user submits 1x, when the page is reloaded the browser understands the action as if there had been another submit, ie reinsert the last inserted product.
This is how the data is printed to the table
while ($result_info = mysql_fetch_array($sql_info))
{
$tabela .= '<tr>';
$tabela .= '<td>'.$result_info['cod_item'].'</td>';
$tabela .= '<td>'.$result_info['desc_item'].'</td>';
$tabela .= '<td>'.$result_info['unidade'].'</td>';
$tabela .= '<td>'.$result_info['quantidade'].'</td>';
$tabela .= '<td>'.$result_info['valor'].'</td>';
$tabela .= '<td><a onclick="needToConfirm = false;" style="margin-left: 30px;" title="Excluir" src="../../dist/icons/delete.png"></a></td>'; href="pecas_proposta_incluir_temp_del.php?id={$linhas["id_temp"]}"><img
$tabela .= '</tr>';
}
echo $tabela;
How can view data are concatenated into a variable, so that when the user enters more than one item, instead of overwriting the previous item it creates a new line.
In short, what I need is that the user can delete only the specified item and update it on time without the need to reload the page. If anyone has tips on how to reload the page without causing a submit again, I'll be grateful.