Hi,
Trying to complete a contact page as part of a webpage. When I click send it transfers to a blank page. Not sure where went wrong.
contactform.php
<?php
if(isset($_POST['submit'])){
$name = htmlspecialchars($_POST['name']);
$subject = htmlspecialchars($_POST['subject']);
$mailfrom = htmlspecialchars($_POST['mail']);
$message = htmlspecialchars($_POST['message']);
$mailto = "[email protected]";
$headers = "From:" . $mailfrom;
$txt = "You have received an email from".$name.".\n\n.$message;
if(from($mailto,$subject,$txt,$headers));
{
echo "<b>Message successfully sent</b>";
}
else { echo"<b>Message sending failed...</b>";
}
?>
Thank You