I need to make a button that when the user clicks the corresponding line it executes the following code without refresh:
Line Code:
mysql_query('UPDATE tbl_publicacao SET status = S WHERE cod_publicacao = $cod_publicacao');"
Line:
<?php $cod_publicacao = $back_query['cod_publicacao'];
$arquivo = $back_query['arquivo'];
echo"<a href='upload/publicacoes/{$razao_social}/{$tipo}/{$titulo}/{$ano}/{$arquivo}'>
<i class='ace-icon fa fa-eye bigger-110 hidden-480'></i> Visualizar Arquivo</a>";
?>
I believe that there should be an onclick function in javascript but I do not know how to develop it to change in javascript