title: Using $.post to send JS variables to PHP script
body: <p>I am trying to send Javascript variables over to a PHP script for updating scores of a quiz game. I've looked up the shorthand method of doing this, which is $.post, but I am unable to retrieve the values in the PHP script. I am fairly unfamiliar which JS and require help as to what I am doing wrong.</p>
  
  <p>Here is the Javascript</p>
  
  <pre><code>function updatescore(){
              var thisgamemarks= 2300;
              var thequizid = 5;
              $.post("updatemark.php", { quizidvalue: thequizid, newmarkvalue: thisgamemarks } );
              }
  </code></pre>
  
  <p>And the PHP</p>
  
  <pre><code>$studentnewmark = $POST['newmarkvalue'];
  $thisquizid = $POST['quizidvalue'];
  $thisstudentid = $_SESSION['studentid'];
  </code></pre>