title: display echo msg within same div tag
body: <p>I am making contact form which sends form data into database as well as into mail(both working fine) but when submitting form, I want to display thank you message within .mail_middle class and hide the form. </p>
  
  <p>Right now I am getting message "Thank u for your comment!" instead of "Thank you for quote request" with in same class.</p>
  
  <p><strong>I want "Thank you for quote request" to be displayed and hide form.</strong></p>
  
  <p>Plz help me further with code as I am unaware of what to do now.....</p>
  
  <p><strong>form.php</strong></p>
  
  <pre><code>&lt;form method='post'&gt;
    Name: &lt;input type='text' name='name' id='name' /&gt;
    Email: &lt;input type='text' name='email' id='email' /&gt;
    &lt;input type='submit' value='Submit' class='mailbtn' /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>process_db.php</strong></p>
  
  <pre><code>&lt;?php
  
    [...]    
    mysql_query($query);    
    echo "Thank you for your Comment!";    
    mysql_close($con);      
    include("mail.php"); 
  }
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="middle mail_middle"&gt;
  
  &lt;fieldset&gt;
      &lt;?php include("form.php"); ?&gt;
      &lt;?php include("process_db.php"); ?&gt;                                         
  &lt;/fieldset&gt;
  
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  
              $('.mailbtn').live('click',function(){
  
              $.ajax({
              type: "POST",
              async : false,
              url: "mail.php",
              data: { name:name, email:email, phn:phn, budget:bgt, comment:txt, loc:loc}
  
              })
              .done(function( msg ) {
              $('.mail_middle').html('');
              $('.mail_middle').html('Thank you for quote request.');
              return false;
              });
  
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>mail.php</strong></p>
  
  <pre><code>&lt;?php
  
  $to =  array("email-id1","email-id2");
  
  $subject = "my_subject";
  $message .= "&lt;table border='1'&gt;";
  $message .= "&lt;tr&gt;&lt;td&gt;Name    &lt;/td&gt;&lt;td&gt;".$_POST['name']."&lt;/td&gt;&lt;/tr&gt;";
  $message .= "&lt;tr&gt;&lt;td&gt;Email   &lt;/td&gt;&lt;td&gt;".$_POST['email']."&lt;/td&gt;&lt;/tr&gt;";
  $message .= "&lt;/table&gt;";
  
  $from = "email-id";
  $headers = "MIME-Version: 1.0\r\n"; 
  $headers .= "Content-type: text/html; charset=utf-8\r\n"; 
  $headers .=  'from: '.$from .'' . "\r\n" .
  
              'Reply-To: '.$from.'' . "\r\n" .
  
              'X-Mailer: PHP/' . phpversion();
  foreach($to as $row)
  {
     mail($row,$subject,$message,$headers);
  }
  
  echo "Mail Sent.";
  die;
  ?&gt;
  </code></pre>