2
I’m developing a system with the discount part, so I wanted the user to enter the discount and after he finished validating whether or not and show the discount percentage.
$cupom = $this->input->post('cupom_desconto');
$desconto = $this->desconto_model->buscarDesconto($cupom, $atividade_codigo);
This is the way I am doing, but this way is sending the request to another page and I would like it to be done on the same page, example of Netshoes and others that we put the code and if it is valid appears on the same page the value of the discount, if you have, otherwise does not change anything.
what have you done ? post an example of your progress.
– Gabriel Rodrigues
@Gabrielrodrigues The way I’m doing is passing to another page, the user enters the code and on the other page I do the checking.
$cupom = $this->input->post('cupom_desconto');
 $desconto = $this->desconto_model->buscarDesconto($cupom, $atividade_codigo);
– Matheus Azevedo
edit your question and post this information.
– Gabriel Rodrigues