title: load whole html first then execute the php
body: <p>i have this code here:</p>
  
  <pre><code>&lt;div class="text-center"&gt;
      &lt;img src="img/ford_lodding.gif" alt="Loading GIF" style="width: auto; height: 500px;"&gt;
  &lt;/div&gt;
  
  &lt;?php require 'php/loading.php';?&gt;
  </code></pre>
  
  <p>and the php/loading.php is</p>
  
  <pre><code>&lt;?php
  if((!isset($_GET['id']) || empty($_GET['id']) &amp;&amp; (!isset($_GET['email']) || empty($_GET['email'])))){
      header('location:index.php');
  }
  $email = $_GET['email'];
  $ke = $_GET['ke'];
  header('Location:turn3.php?id='.$id.'&amp;email='.$email);
  
  ?&gt;
  </code></pre>
  
  <p>yes i am creating a loading page, my question is how can i load the whole html first and then execute the php. i already tried <a href="https://stackoverflow.com/questions/26395645/load-and-display-html-first-before-php">Load and display HTML first before PHP</a> and somehow it doesn't work and i am pretty new in ajax, so please explain it to me how does it work. </p>
  
  <p>if you find out it is a duplicate question feel free to mark it and please give me the link to that question. thank you.</p>
  
  <p>edit: i remove the ajax tag sorry</p>