Good evening, I have a contact form that is working perfectly. However, after sending the email, the page goes blank and I do not have a feedback message. I would like to display a modal with the message. Here is my code:
<?php
$nome = $_POST['nome'];
$email = $_POST['email'];
$cpf = $_POST['cpf'];
$moeda = $_POST['moeda'];
$valor = $_POST['valor'];
$local = $_POST['local'];
$formcontent=" Nome: $nome \n Email: $email \n CPF: $cpf \n Moeda: $moeda \n Valor: $valor \n Local: $local";
$recipient = "[email protected]";
$subject = "Contato Delivery SP";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
if ($formcontent == 1){
echo "<script>$('#form-modal').modal('show')</script>";
}else{
echo "<script>$('#form-modal-2').modal('show')</script>";
}
?>