title: Missing a value from submitted HTML form
body: <p>I've written the following code which records whether user submitted answers are correct. 
  score_one is either 0 or 1 for getting the first question right, score_two is either 0 or 1 for getting the second question right and so on.
  totalScore is basically the sum of score_one to score_four</p>
  
  <p>What I would like is that the totalScore value returned through PHP to my email address. My current HTML form has an email field and a name field. I have a PHP script which is successfully sending these field answers to my inbox. However I can't get the totalScore value to appear. The code below is what I'm using but I'm not an expert</p>
  
  <pre><code>&lt;input type="text" id="score" value="" disabled /&gt;
  &lt;script&gt;
  
      var score_one = 0;
      var score_two = 0;
      var score_three = 0;
      var score_four = 0;
      var totalScore = 0;
  
      function fsubmit(){
          var correctFirstAnswer = document.getElementById("price_three");
          var correctSecondAnswer = document.getElementById("price_six");
          var correctThirdAnswer = document.getElementById("price_seven");
          var correctFourthAnswer = document.getElementById("price_eleven");
  
          if (correctFirstAnswer.checked === true){
              score_one = 1;
          }
  
          if (correctSecondAnswer.checked === true){
              score_two = 1;
          }
  
          if (correctThirdAnswer.checked === true){
              score_three = 1;
          }
  
          if (correctFourthAnswer.checked === true){
              score_four = 1;
          }
  
          totalScore = score_one + score_two + score_three +score_four;
      }
  
  
      document.getElementById("score").value = totalScore;
  &lt;/script&gt;
  </code></pre>
  
  <p>My PHP code snippet is:</p>
  
  <pre><code>$email = $_POST['email'];
  $name = $_POST['name'];
  $score = $_POST['score'];
  
  $body = &lt;&lt;&lt;EOD
  Name: $name &lt;br&gt;
  Email: $email &lt;br&gt;
  Score: $score &lt;br&gt;
  </code></pre>
  
  <p>A typical reply is:
  Name: Mr Bloggs
  Email: bloggs@bloggs.com
  Score:</p>
  
  <p>I get no value at all in the Score: part - no zero or anything.</p>
  
  <p>Can anyone help? I would be really grateful - I'm not an expert coder, just muddling through really.</p>