title: PHP if $_GET isset and not equal to
body: <p>I have this condition, what I am trying to do is say, if $_GET['subpage'] is not equal to registerupcoming then do this, but I get an error:</p>
  
  <blockquote>
    <p>Notice: Undefined index: subpage in /Applications/XAMPP/xamppfiles/htdocs/losanihomes/views/includes/header.php on line 26</p>
  </blockquote>
  
  <p>So I tried the following:</p>
  
  <pre><code>if(isset($_GET['subpage']) &amp;&amp; $_GET['subpage'] != 'registerupcoming'){
  
  //Do Something
  
  }
  </code></pre>
  
  <p>but the problem is, if subpage is not set, then it does not go into the condition, I only want to not go into this condition if subpage is not equal to registerupcoming</p>