title: The php if(isset($_GET['something'])) is not working
body: <p>I tried my best to figure out how to redirect someone based on the <code>index.php?ref=[link]</code> , searched the internet... And couldn't figure out, here is my code :</p>
  
  <pre><code>if(isset($_GET['ref'])){
      header("Location: /" . $_GET['ref']);
  }else if(empty($_GET['ref'])){
      header('Location: /welcome/');
  }else{
      header('Location: /welcome/');
  }
  </code></pre>
  
  <p>It always executes the <code>else if</code> one, even if the value in <code>?ref</code> is set.
  Anyone can help?</p>