I am creating a contact us form, In that i am using HTML and PHP .Now my doubt is after click the submit button the details are not sending to mail,I want to know where i am mistaken on my code.
 Here my HTML code for create the form
<form action="sendmail.php" method="post" >
   <table width="100%" border="0"align="center"cellpadding="3"cellspacing="1">
      <tr>
         <td width="10%">Subject</td>
         <td width="2%">: </td>
         <td width="82%"><input name="name" type="text" id="name" size="50"></td>
      </tr>
      <tr>
         <td>Detail</td>
         <td width="2%">: </td>
         <td width="82%"><textarea name="detail" cols="50" rows="4"id="detail"></textarea></td>
      </tr>
      <tr>
         <td>Email</td>
         <td>: </td>
         <td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
      </tr>
      <tr>
         <td>Name</td>
         <td>: </td>
         <td><input name="name" type="text" id="name" size="50"></td>
      </tr>
      <tr>
         <td><input type="submit" name="send" value="Submit">
            <input type="reset" name="submit" value="Reset">
         </td>
      </tr>
   </table>
</form>
PHP code is below:
<?php 
  $subject="$subject";
  $message="$detail";
    $mail_from="customer_mail";
//From
$header="from: $name <$mail_from>";
//Enter your email address
$to="simon@abcinfomedia.in";
$sendmail=mail($to,$subject,$message,$header);
//check mail send to ur mail
if($sendmail){
    echo"success";
}
else{
    echo"Error";
}
?>
 
     
     
    