I'm trying to send two parameters of the shopping cart through url, then the client to confirm, but I can only get an array on the other page and I do not know how to get two.
I want to send the quantity of products and the product_id to the page on another page, where the user will confirm and then insert into database >.
On the cart page
<?php
**// array para guardar todos os valores que estão no carrinho
$emparray[] = $product['id_produto'];
$quant[] = $product['quantidade'];
...
// transformar a array numa associação de parâmetros para a url
$query = http_build_query($emparray);
testar = http_build_query($quant);
$cart_box .= '<div class="cart-products-total">Total : '.$total.' € <u><a href="index.php?page=confirmar_encomenda&'.$query.'&'.$testar.'" title="Verifica o carrinho e faz checkout">Concluir</a></u></div>';
?>
On the other page, that's how I get the values. In order to send in the form confirmation.
<?php
$teste=$_GET;
echo $teste;
foreach($teste as $value){
echo' <input type='text" name="result[]" value="'. $value.'">';
}
?>
But this way it just shows the last array and I've already tried N forms to get the two separated but I could not.