title: PHP mail function sending the email, but not the html form data
body: <p>The HTML consists of simple input fields as listed in the php below, what happens is PHP mail() sends the email but excludes the form data itself. I have spent a lot of time but not sure why this is happening.</p>
  
  <p>and the php to send the mail:</p>
  
  <pre><code>&lt;?php
  
  $to = "user@gmail.com";
  $subject = "Question Bank - New Question";
  $message = '&lt;html&gt;
          &lt;head&gt;
            &lt;title&gt;New Question&lt;/title&gt;
            &lt;style&gt;
              table {
                           border: 1px solid black;
                         }
              table th, tr{
                  text-align:center;
              }
            &lt;/style&gt;
  
          &lt;/head&gt;
          &lt;body&gt;
            &lt;table cellspacing="20px"&gt;
              &lt;tr&gt;
                &lt;th&gt;Username&lt;/th&gt;
                &lt;th&gt;Email&lt;/th&gt;
                &lt;th&gt;Question&lt;/th&gt;
                &lt;th&gt;Question Hint&lt;/th&gt;
                &lt;th&gt;Correct Answer&lt;/th&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                &lt;td&gt;'.$_POST["username"].'&lt;/td&gt;
                &lt;td&gt;'.$_POST["email"].'&lt;/td&gt;
                &lt;td&gt;'.$_POST["question"].'&lt;/td&gt;
                &lt;td&gt;'.$_POST["questionhint"].'&lt;/td&gt;
                &lt;td&gt;'.$_POST["answer"].'&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/table&gt;
          &lt;/body&gt;
          &lt;/html&gt;';
  
  $headers  = 'MIME-Version: 1.0' . "\r\n";
  $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
  
  
  $headers .= 'From:  user@company.com' . "\r\n";
  $headers .= 'Cc: cc@example.com' . "\r\n";
  
  mail($to,$subject,$message,$headers);
  ?&gt; 
  </code></pre>