My Contact form subscripltion works put does not echo to subscriber that message has been sent..I am not sure how to get the response message to display on page after subscribing. Here is my my html code
<?php
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['msg'];
$mailto = "
[email protected]";
$headers = "From: ".$email;
$headers .= "Cc:
[email protected] \r\n";
$txt = "You have a message From ".$name.".\n\n".$message;
mail($mailto, $email, $txt, $headers);
echo $_POST["msg"];
if(!$email->send())
{
echo "Mailer Error: " . $email->ErrorInfo;
}
else
{
echo "Message has been sent successfully";
}
header("Location: form-to-email.php?emailsent");
}
?>