How to stay on the same page

-2

In a 20 page HTML project I would like to put a form in PHP to capture emails in each of them. What is the command so that, after the alert, the user stays on the same page where he / she registered - other than the Contact page (the only one in PHP)?

    if(EnviarEmail($destino, $email, $assunto, $msg)){
        echo '<script type="text/javascript">
        alert("'.$nome.', sua mensagem foi enviada com sucesso!")
        window.location = "../contato.php";
        </script>';
    
asked by anonymous 15.06.2016 / 17:46

1 answer

0

Remove this line

window.location = "../contato.php";
    
15.06.2016 / 18:11