title: Two redirects after each other in PHP
body: <p>I have a form on frontend page that after submiting should redirect to a page that API returns but I must redirect first to a thank you page and then after some seconds should redirect to the page that the API returns.</p>
  <p>this is so far what I have tried but it only waits for the second refresh.</p>
  <pre><code>if(isset($result_array['status']) &amp;&amp; $result_array['status'] == true)
  {
      $autologin_url = $result_array['data'] . PHP_EOL;
      $signup_result = true;
      header(&quot;refresh: 5; url = fakeurl.com/thanks.php&quot;);
      header(&quot;refresh: 15; url = $autologin_url&quot;);
  }
  else
  {
      echo $result;
      $signup_result = false;
      header('location: fakeurl.com/?report=signup_error');
  }
  </code></pre>