title: I have a contact form that is sending blank emails?
body: <p>I am a complete novice before we start!</p>
  
  <p>I have had a contact form created for me using PHP. I have embedded the code into my emailer html and changed the email address in the php file.</p>
  
  <p>The people who created it say it works fine on their server and have sent me the emails to prove it does.</p>
  
  <p>After clicking Submit, the email comes through but it is blank, any ideas?</p>
  
  <p><strong>PHP Code (file name <code>simple-mailprocess_v2</code>):</strong></p>
  
  <pre><code>&lt;?
      $to= ('info@cre8ivo.co.uk'); 
      $subjectline= ('Website - form enquiry - Speak to a private medical insurance     specialist'); 
      $thanks=('thankyou.html');
      $return=('Location:'.$thanks);
      if (sizeof($_POST)) {
          $body = "";
          while(list($key, $val) = each($HTTP_POST_VARS)) {
              $body .= "$key: \n $val \n\n";
              // Check if all fields have been filled in
              if(empty($val)) {
                  echo ("&lt;b&gt;&lt;li&gt;either one or more required fields have not been completed. Go &lt;a     href='javascript: history.go(-1)'&gt;Back&lt;/a&gt; and try again&lt;/li&gt;&lt;/b&gt;");
                  exit();
              }
          }
      }
      // Secure the headers
      $security = "From: \r\n";
      $security .= "Reply-To: \r\n";
      $security .= "Return-Path: \r\n";
      $security .= "CC: \r\n";
      $security .= "BCC: \r\n";
      // Send the email.
      if ( mail($to,$subjectline,$body,$security) ) {
          header($return);
      } else {
          echo "The email has failed!";
     }
  ?&gt;
  </code></pre>
  
  <p>Any help is much appreciated!</p>
  
  <p>Any more info need then I will provide, not sure what it needed sorry!</p>
  
  <p>Many Thanks,
  Jane.</p>