0
I want to pass two variables to another page through GET. I already have one working like this:
<a class='fa fa-remove' href='remover.php?remover=carrinho&id=$idproduto' style='font-size:24px'></a>
But what I’m doing now is a form so the url would be the form action, and so it’s not working because it sends the form variables and not the ones I wrote in the action, for example:
<form action='quant.php?qtd=carrinho&id=$idproduto'>
<div class='input-group mb-2' style='text-align:
center'>
<input class='form-control' id='qtd1' name='qtd2'type='text'
value='$quantidade'/>
<div class='input-group-append'>
<div class='input-group-append'>
<button class='btn btn-outline-secondary fa fa-refresh' type='submit'><span
class='glyphicon glyphicon-refresh'></span>
</button>
</div>
</div>
</div>
</form>
should go to quant.php?qtd=carrinho&id=$idproduto
but goes to quant.php?qtd2=12
I want it to pass the $idproduct and the value the user entered in the inputbox.
The form sends the information inside it. The action is the reference for who will process the data, you would have to create an Hidden input to send this information together.
– Mauro Alexandre