title: Wait-time before redirect in PHP
body: <p>This is my code on page1:</p>
  
  <pre><code>session_start();
  if(isset($_SESSION[$login])){
      header("Refresh: 5; location:page2.php");
      echo "Welcome back!";
  }
  </code></pre>
  
  <p>I thought this was the way to have a redirect on page2 AFTER 5 seconds of pause, in which the user can see the message "Welcome Back". Am I wrong?</p>
  
  <p>The result of my code is a correct identification of the login, with the consequent showing of echo "Welcome Back", but the redirect isn't happening. I remain in page1 forever.</p>
  
  <p>Where is the error?</p>
  
  <p>ps: I made a search of similar threads, but I hadn't be able to solve the problem, so I'm posting here guys, thank you!</p>