how to send a message using php code example
Example 1: alert in php
echo '<script>alert("Message")</script>';
Example 2: php mail success message
if(mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader))
{
echo "<script>document.location.href='contact.php'</script>";
}
else
{
echo "<script>alert('Mail was not sent. Please try again later');</script>";
}
}