麻烦PHP

I'm new to PHP. Basically I'm a graphic designer turned frontend designer. I know html css and simple jquery. I need to include this contact form in a website, but doesn't seem to work. Plz help. If someone could point out if anything is wrong with the code, it would be great help. Thanks in advance.

This is the html part of the contact form :

<div class="form">  

<form action="mail.php" method="POST">
<label>Name</label>
<br>
<input type="text" name="name" placeholder="Type Here">
    <br><br><br>
<label>Email</label>
<br>
<input type="email" name="email" placeholder="Type Here">
  <br><br><br>
<label>Message</label>
<br>
<textarea name="message" rows="20" cols="20" placeholder="Type Here">    </textarea>
    <br><br><br>
<label>*What is 2+2? (Anti-spam)</label>
<br>
<input type="text" name="human" placeholder="Type    
 <br><br><br><br>
 <input id="submit" name="submit" type="submit" value="SUBMIT">
</form>

This is the php :

<?php
$name = $_POST['name'];
$email = $_POST['email'];

$message = $_POST['message'];
$formcontent=" From: $name 
 Message: $message";
$recipient = "saurabhdey84@gmail.com";
$subject = "Vibhor Sogani Website Contact Form";
$mailheader = "From: $email 
";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You! Your message has been sent." . "-" . <a href='home.html' style='text-decoration:none;color:#ff0099;'> Return Home</a>";
?>

HTML:

Change your text control to

<input type="text" name="human" placeholder="Type the answer"/>

Formatting mistake detected:

<input type="text" name="human" placeholder="Type    
 <br><br><br><br>
 <input id="submit" name="submit" type="submit" value="SUBMIT">

PHP: Last echo statement should be like this: (missed double-quotes)

echo "Thank You! Your message has been sent." . "-" . "<a href='home.html' style='text-decoration:none;color:#ff0099;'> Return Home</a>";

not like this:

echo "Thank You! Your message has been sent." . "-" . <a href='home.html' style='text-decoration:none;color:#ff0099;'> Return Home</a>";

To be better:

echo "Thank You! Your message has been sent. - <a href='home.html' style='text-decoration:none;color:#ff0099;'> Return Home</a>";

No need any concatenation here!

Change your echo like this,

echo "Thank You! Your message has been sent." . "- <a href='home.html' style='text-decoration:none;color:#ff0099;'> Return Home</a>";
                                                ^// no need of contenation here

If you're calling php page, it is just taking blank values, try these changes and let me know,

include_once("home.html");
if(isset($_POST['submit']))
{
**Your php code here**
}

Check if your POSTS are getting sent to the server script by echoing $_POST['name']. If it is , then it is a problem with the mail() function. You are using the default php mail() function.It doesnt work without the correct headers. I see that you have used just one 'reply From' header.So you need to look deeper into using mail function(). An alternate for sending emails could be the phpmailer library which is used widely

try this, and put required at closing tags of input

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

      {

  $name = $_POST['name'];
  $email = $_POST['email'];
  $message = $_POST['message'];

   $to = "maild@gmail.com";



      $subject = " contact form" ;
      $headers .= "MIME-Version: 1.0
";
      $headers .= "Content-Type: text/html; charset=ISO-8859-1
";
         $mesg = '$name  $email  $message';
     $kk=mail($to,$subject,$mesg,$headers);
       if($kk){
      ?>

     <script>

     window.location.href='thankyou.html';
        </script>

         }

    }

     ?>

This is how it is usually

$headers = "MIME-Version: 1.0" . "
";
$headers .= "Content-type:text/html;charset=UTF-8" . "
";
$headers .= 'From: <webmaster@example.com>' . "
";
$headers .= 'Cc: myboss@example.com' . "
";

Like Ive said before , phpmailer library is a more reliable alternate