title: Mail function is not working in PHP
body: <pre><code>&lt;?php
  
  if (isset($_POST['submit']))
  {
      //if "email" is filled out, proceed
  
      $name=  mysql_real_escape_string($_POST['name']);
      $phone=  mysql_real_escape_string($_POST['phone']);
  
      $to = "admin@gmail.com";
      $subject = "Customer Intrested";
      $message = "Buyer Information and Intrested in land.";
      $message.= "Customer Name :".$name."\n";
      $message.= "Customer Phone :".$phone."\n";  
  
      $mail=mail($to, "Subject: $subject",$message );
      if($mail){
          echo "success";
      } else {
          echo "failed."; 
      }
  ?&gt;
  </code></pre>
  
  <p>I am using the above code to send email..but i am unable to get the result..it always showing the "Thank you message"..</p>
  
  <p>I can able to get the values of name and phone.</p>
  
  <p>How to fix this Problem?</p>