0
I have a php Insert that redirects me to a page showing a success/error message through the url result, how can I update the url after the Alert script runs?
For example the url is: php? msg=error I wish she’d come back to: php.
<?php
if (isset($_GET['msg']) && $_GET['msg'] == 'error') {
    echo '
        <div class="alert alert-danger" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
            <strong>Erro!</strong> Cadastro não efetuado.
        </div> ';
        }elseif (isset($_GET['msg']) && $_GET['msg'] == 'success'){
            echo '
            <div class="alert alert-success" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                <strong>Successo!</strong> Cadastro efetuado.
            </div>   
            ';
            }
?>
<script>
    window.setTimeout(function() {
        $(".alert").fadeTo(500, 0).slideUp(500, function(){
            $(this).remove(); 
        });
    }, 4000);
</script>
How so change the URL? Explain better by editing the question, please.
– Sam
All right, I edited.
– Jvs Corrêa
You can’t just change the call to POST?
– user38174