After a query, I am sending different values through the same variable (via an input):
<input type="hidden" id="sku" name="sku" value="<?= $reg->sku ?>">
That way, my URL looks like this:
http://localhost/admin/anuncios/relatorios/exportado_confirm.php?sku=BL001_BA307&sku=BL001_BA308&sku=BL001_BA667&sku=BL001_BA668&sku=BL001_BA672&sku=BL003_BA309&sku=BL005_BA27&sku=BL166_BA7&sku=BL166_BA8&sku=BL178_BA310&sku=BL184_BA1&sku=BL184_BA4&sku=BL184_BA669&sku=BL202_BA5
But I can not capture all the sku sent through $sku = $_GET['sku']);
For when I run the following UPDATE
: $sql = "update anuncios set exportado = '1' where sku = '{$sku}'";
It can only catch the last value sent in the variable "sku" and run the UPDATE on the last "sku" listed in the URL.
I wanted to be able to capture all the values, and that UPDATE
(while) while there was some value in the variable sku. Anyone have any suggestions to help me?
Note: I'm actually doing everything by POST, I just put it by GET to be visible the values sent in the same variable.