title: php echo will not display until mail function complete
body: <p>I cannot get the  this echo (below) to display right away.  It will display only after the mail function complete.  I try using ob_start ob_flush nothing seem to work. When I put exit; before the mail function, the echo display with no delay. Any suggestions on how to have the echo display with on delay would be appreicated</p>
  
  <pre><code>echo '&lt;div style=\'margin-top: 10px; margin-left:2px; border: 5px groove blue; border=radius:5px;     padding-left: 10px; width:400px;\'&gt;
   &lt;p&gt;Thanks By &lt;a href="http://www.anyname.com"&gt;XXX Martial Art&lt;/a&gt;&lt;/p&gt;
   &lt;hr style=\'margin: 1px auto 1px auto; height: 1px; color: #fefefe; width: 82%;\'/&gt;    
   &lt;h1&gt;Thanks for Your Message! &lt;br&gt;Your message has been sent!  &lt;/h1&gt;
   &lt;p&gt;&lt;a href="Default.html"&gt;Click to go to Home page!&lt;/a&gt;&lt;/p&gt;
   &lt;/div&gt;';
  
  &lt;?php
  
  if (isset($_POST['submit'])){
  $name = trim(stripslashes(htmlspecialchars($_POST['name'])));
  $email = trim(stripslashes(htmlspecialchars($_POST['email'])));
  $message = trim(stripslashes(htmlspecialchars($_POST['message']))); 
  $mailTo = "anyname@yahoo.com";
  $msgSubject = "Requesting Information ";
  $msgBody = "From:  $name,\n\r Email:  $email,\n\r Message:\n\r$message";
  /*$xHeaders = "From: $email X-Mailer: PHP/". phpversion(); */
  $xHeaders = "From: $email" . phpversion();
  
  if ($_POST['name'] == "" || $_POST['email'] == "" || $_POST['message'] == ""){
  echo "You forgot to enter data in all the field&lt;br&gt;Please enter the data and then submit again";
  exit;}
  
  echo '&lt;div style=\'margin-top: 10px; margin-left:2px; border: 5px groove blue; border=radius:5px;     padding-left: 10px; width:400px;\'&gt;
   &lt;p&gt;Thanks By &lt;a href="http://www.anyname.com"&gt;XXX Martial Art&lt;/a&gt;&lt;/p&gt;
   &lt;hr style=\'margin: 1px auto 1px auto; height: 1px; color: #fefefe; width: 82%;\'/&gt;    
   &lt;h1&gt;Thanks for Your Message! &lt;br&gt;Your message has been sent!  &lt;/h1&gt;
   &lt;p&gt;&lt;a href="Default.html"&gt;Click to go to Home page!&lt;/a&gt;&lt;/p&gt;
   &lt;/div&gt;';
  
  mail($mailTo, $msgSubject, $msgBody, $xHeaders);
  
  $mailTo = $email;
  $msgSubject = "Thank You for your email.";
  $msgBody = "Thank you for your email. I will respond to you as soon as possible.\n\r
  Please feel free to contact me at (818)111-1111 you need immediate assitance.\n\r Our hours are  Monday-Friday 3pm-7:45pm and Saturday 11am-2pm.\n\r
  You are alway welcome to drop by during these hours to check out my classes.\n\r\n\r Thank You\n\r Master Lee";
  $xHeaders = "From: anyname@yahoo.com". phpversion();
  mail($mailTo, $msgSubject, $msgBody, $xHeaders);
  echo '&lt;script type="text/javascript"&gt;clearform()&lt;/script&gt;';
  
  }
  
  ?&gt;
  </code></pre>