title: Passing a JS variable to PHP Safely
body: <p>I making a javascript game where the player builds up a score against a count down timer. When the timer runs out I display a form that show the score and lets the user enter they username (arcade style). I'm going to use the POST method send the user score to a php file that will store it somehow (database,textfile. or something). How do I prevent people from fiddling with the JS code and passing some new value thru that isn't the correct score (or something that isn't malicious).</p>
  
  <p>At the very least, what are the safest methods on the PHP/reviving end to at least only accept and integer value?</p>