Colleagues
I'm bringing in a shopping cart, the traditional way. See:
ButI'dliketoupdatetheproductswithoutbringingthemintoaloop.I'mdoingitthisway:
while($jmCarrinho=mysqli_fetch_object($sqlCarrinho)){......$mostrar.="<td><div align='center' style='margin-top: 25px'><input type='number' name='Quantidade[]' min='1' max='".$jmProdutos->Estoque."' value='".$jmCarrinho->QtdProdutos."' maxlength='3'></div></td>";
}
And picking up quantity updates this way:
<?php
foreach($_POST["Quantidade"] as $qtd){
// Aqui crio o update
}
When I do this, I end up giving 03 updates or more depending on the amount of products in the cart. Can you just pick up this specific product from the specific product? For example. I would like to change the second product from 7 to 10 and only it to be updated.