I have an onclick confirm in my code that, if ok, it sends a variable to a specific page. If he canceled ... he should cancel the operation.
But even if you click cancel, it is sending the variable to the page.
Follow the code:
<a onclick="confirm('mensagem de confirmação')" href= "close.php?id_os=<?php echo $temp['id']?>";>
<div style="width:5%; height:100%">enviar
</div>
</a>
Obs: The inserted PHP is ok. In fact, as stated earlier, on whatever button I click (ok or cancel), it sends the variable to the page in question.