I'm putting a form in my index.php, to be sent the filled data to my email.
How do I do when the person clicks the submit button, the page does not update?
The system is working fine, it sends to my email correctly, but when I click the button to send, it appears that looks.
Doesanyoneknowwhyyouaregivingthiserror?
index.php
<?php$msg=0;@$msg=$_REQUEST['msg'];?><!DOCTYPEhtml><htmllang="pt-br">
<head> etc...
<body>
<form action="processaForm.php" method="post">
<label for="nome">Nome:</label><br>
<input id="nome" name="nome" type="text" required><br>
<label for="email">E-mail: (obrigatório)</label><br>
<input id="email" type="email" name="email" required><br>
<label for="telefone"> Telefone/Whatsapp:</label><br>
<input type="text" name="telefone" id="telefone" value="27 " required><br>
<label for="assunto"> Descreva o serviço que deseja:</label><br>
<textarea name="assunto" id="mensagens assunto"> </textarea><br>
<input type="submit" id="miniSuccessAnimation" class="btn btn-success">
</form>
</body>
PHP
<?php
$para= "[email protected]";
$assunto= "Contato pelo Site";
$nome= $_REQUEST['nome'];
$fone= $_REQUEST['telefone'];
$email= $_REQUEST['email'];
$msg= $_REQUEST['assunto'];
$corpo = "<strong> Mensagem de Contato</strong><br><br>";
$corpo .= "<strong> Nome: </strong> $nome";
$corpo .= "<br><strong> Telefone: </strong> $fone";
$corpo .= "<br><strong> Email: </strong> $email";
$corpo .= "<br><strong> Mensagem: </strong> $msg";
$header = "Content-Type: text/html; charset= utf-8\n";
$header .="From: $email Reply-to: $email\n";
mail($para,$assunto,$corpo,$header);
header("location:index.php?msg=enviado");
?>