Basically, you've tried to use .html as php, take your script and place it in a separate file and name it something like sendmessage.php, then inside your contact.htm file edit this:
<form name="form1" method="post" action="">
and change it to this:
<form name="form1" method="post" action="sendmessage.php">
You can change sendmessage.php for what ever you decide to call the new file.
Also, you should really notify your users that their message has been sent, so swap this
/*
* Please be away that this can still be attacked by spam bots and they may use this to send you junk emails.
*/
$to = "studentmatters@yahoo.com";
$subject = "Feedback";
$headers = "From: $name <$email>";
mail($to,$subject,$msg,$headers);
}
Swap it for:
/*
* Please be away that this can still be attacked by spam bots and they may use this to send you junk emails.
*/
$to = "studentmatters@yahoo.com";
$subject = "Feedback";
$headers = "From: $name <$email>";
mail($to,$subject,$msg,$headers);
header('location:thanks.html');
}
And create a page called thanks.html, it will come up after some one has contacted you.