title: How to "properly" handle $_GET variables in PHP?
body: <p>Currently, I have the following code:</p>
  <pre><code>if(isset($_GET['mid']) &amp;&amp; !empty($_GET['mid'])) {
      $mid = $_GET['mid'];
  
      if(is_numeric($mid) &amp;&amp; $mid &gt; 0) {
          if(isset($_GET['op']) &amp;&amp; !empty($_GET['op'])) {
              $op = $_GET['op'];
  
              if($op == 'info') {
              }
  
              if($op == 'cast') {
              }
          }
      }
  }
  </code></pre>
  <p>But I think it's too &quot;complex&quot; with if statements inside if statements, etc...</p>
  <p>Would you handle it differently? How would you make it simpler?</p>