You will need to have the script online/hosted to run properly, because it is a PHP file. Try it on a sub domain, or when it is setup.
Using an html to call a php file on localhost will not work as you want.

Here is the form (contact.php) I use personally, very simplistic and versatile (commented out the extras)

<?php
if(isset($_POST['contact'])) {



$sendmail = 'receivinginbox@mail.com';
$clientmail = $_POST['email'];
$name = $_POST['name'];
$message = $_POST['message'];



// if ($clientmail == '') {
// header('Location: contact.php?error=incomplete');
// exit();
// }

// if ($message == '') {
// header('Location: contact.php?error=incomplete');
// exit();
// }

// if ($name == '') {
// header('Location: contact.php?error=incomplete');
// exit();
// }


//Send Mail

$subject = "New message From ".$name;

$sendmessage = "You have received a message from ".$name." at the contact address ".$clientmail."

They said:

------------------------------------

".$message."

------------------------------------

This message was sent from MyWebsite.com
";

mail($sendmail, $subject, $sendmessage);

header('Location: contact.php?mail=sent');
exit();

}

?>
<?php
//if($_GET["mail"] == "sent")
// echo '<p style=" padding-left: 15px; color: #666666;"><b>Thanks for your message - We strive to answer all responses in 24 hours</b></p>';
//if($_GET["error"] == "incomplete")
// echo '<p style=" padding-left: 15px; color: red;"><b>Error - Please fill in the form completely!</b></p>';
?>
<form action="" method="post" id="contact" name="contact" class="submitform" />
<div><label>Name*</label><input type="text" name="name" /></div>
<div><label>Email*</label><input type="text" name="email" /></div>
<div><label>Message*</label><textarea name="message"></textarea></div>
<div class="send-wrap">
<div class="alignleft">
<input class="send" type="submit" name="contact" id="contact" value="Send">
</div>
<span class="alignright">* required</span>
</div>
</form>