title: The right way to check url paramater using isset
body: <p>i was create a script to active user registration but there's a problem with my isset logic. and here's my code:</p>
  
  <pre><code>if (!isset($_GET['x']) || !isset($_GET['y'])) {
  
  
              echo "Check your email for activation code";
  
          }else{
          //collect values from the url
              $memberID = trim($_GET['x']);
              $active = trim($_GET['y']);
  
  
              if(is_numeric($memberID) &amp;&amp; !empty($active)){
  
                  $stmt = $pdo-&gt;prepare("UPDATE users SET active = 'Yes'
      WHERE id = :memberID AND active = :active");
  
                  $stmt-&gt;execute(array(
                      ':memberID' =&gt; $memberID,
                      ':active' =&gt; $active
                  ));
  
                  //if the row was updated redirect the user
                  if($stmt-&gt;rowCount() == 1){
  
                      //redirect to login page
                      header('Location: login.php?action=active');
                      exit;
  
                  } else {
  
                      echo "Your account could not be activated.";
  
                  }
  
              }
          }
  </code></pre>
  
  <p>but if i give code like this in url active.php?x=&amp;y=9b4f0 or active.php?x=777&amp;y= it show nothing. how can i handle this situation?</p>