I have a function to change records in the database and use a modal to show success message or change error.
The issue is that I can delete, but I would like to have the page automatically refreshed after this function.
elseif(isset($_GET['Acao']) && $_GET['Acao'] == 'Alterar') {
$Id = $_GET['Id'];
$sql = mysql_query("UPDATE vendas SET Mostrar = '0' WHERE Id = '$Id' ");
if ($sql){
echo '<script>modal({type: "inverted", title: "INFORMAÇÃO!", text: "Aterado com Sucesso!"});
</script>';}
else {
echo '<script>modal({type: "error", title: "Ops!", text: "Erro ao Alterar!"});</script>';
}
<table class="lista-clientes" width="100%"">
<tbody>
<tr>
<td align="center"></td>
<td>
<select class="select_styled">
<option value="">'.$dados['Pessoa'].' </option>
<option value="">'.$dados['Venda'].'</option>
</select>
<center>
<a href="?Id='.$dados['Id'].'&Acao=Alterar" class="btn btn-follow" style="text-decoration:none;">
<span>Remover!</span>
</a>
</center>
</td>
</tr>
</tbody>
</table>