title: PHP Blank screen White screen after popup message
body: <p>i got a question in php, I want my code to display a popup message if the username or ID already exist in the database, I have the code running below, the problem is after clicking the popup box or clicking ok, a blank screen/white screen appear.</p>
  
  <pre><code>if ($check2 != 0) {
      echo"&lt;script&gt;alert('Sorry, the DAS ID is already in use.');&lt;/script&gt;";
      die;
  }
  </code></pre>
  
  <p>I tried the header function so the page will return to the same page where the popup error appeared, but when I do so, the popup error did not appear. Help please, I'm new in php.</p>
  
  <pre><code>if ($check2 != 0) {
      echo"&lt;script&gt;alert('Sorry, the DAS ID is already in use.');&lt;/script&gt;";
      header("Location: register.php");
      die;
  }
  </code></pre>