title: PHP if() evaluation problem needs a rewrite
body: <p>I noticed  this weird evaluation yesterday after searching for a few hours in my code for an error. i am passing scores into php, sometimes the score=0  which causes an issue.</p>
  
  <p>send php          ?blah=blah&amp;score=0</p>
  
  <pre><code>if(!empty($_REQUEST['score']){
      //do database update stuff
  }else{
     // show entire webpage
  }
  </code></pre>
  
  <p>It works great unless the score=0 the if() will evaluate to false and return the entire webpage to my ajax handler and error. I have temporarily changed !empty to isset but this will cause problems in the future because isset evaluates to true even if the score key is in the url string without a value.<br>
  ex: (?blah=blah&amp;score=&amp;something=else)</p>
  
  <p>my question is: what is the best way to recode this to work correctly now and in the future?</p>
  
  <p>edit: there are a few working answers here, i appreciate everyones time. it was difficult to choose an answer</p>