Clear URL parameters after include

0

When I pass parameters in the URL for a given file through a GET, and this file makes the necessary changes, it has a include to return the home page of the action performed.

When you return to the page, the information passed as parameters is still in the URL (example: site.com/página.php?id=31 ). How do I get it to return and stay just the actual page ( site.com/pagina.php )?

File with include (goes to the header, makes the changes and returns to where it was in the folder templates / inicio.php):

<?php
$excluir=1;
include("includes/cabecalho.php");

if(isset($excluiu)){

    if($excluiu==1 || $excluiu==0){
        include("templates/inicio.php");
    }else{
        echo "<script>alert('O Sistema apresentou algum erro, fale com o administrador!');</script>";
    }

}else{
    echo "<script>alert('O sistema apresentou algum erro, fale com o administrador!');</script>";
}

? >

    
asked by anonymous 23.10.2014 / 23:10

1 answer

-1

For a redirect you'd better switch.

include("templates/inicio.php")

by

header('Location: templates/inicio.php'); ou 
header('Location: http://site.com/pagina.php'); //Ai já redireciona.

More if not "Redirection" as described in the question would not solve the problem.

    
24.10.2014 / 00:02