title: How to get a popup box after submitting a form?
body: <p><strong>[SOLVED]</strong> Thanks everyone that replied.</p>
  
  <p>I've got a PHP script that is run after a user submited a contact form.
  This script shows a message in the top left corner saying if it worked properly or if it encountered a problem.</p>
  
  <p>Now my question is, how can I put those messages into a popup box?
  I know there is JS involved, but I barely have knowledge of that.</p>
  
  <p>( Example: <a href="http://www.dylanvanheugten.nl/contact.php" rel="nofollow noreferrer">http://www.dylanvanheugten.nl/contact.php</a>)</p>
  
  <hr>
  
  <h3>PHP</h3>
  
  <pre><code>$name = $_POST['name'];
  $email = $_POST['email'];
  $message = $_POST['message'];
  $from = 'From: Site Contact';
  $to = 'info@dylanvanheugten.nl';
  $subject = $_POST['subject'];
  $human = $_POST['human'];
  
  $body = "From: $name\n E-Mail: $email\n Message:\n $message";
  
  if ($_POST['submit']) {
      if ($name != '' &amp;&amp; $email != '' &amp;&amp; $subject != '' &amp;&amp; $message != '') {
          if ($human == '12') {                
              if (mail ($to, $subject, $body, $from)) { 
                  echo '&lt;p&gt;Uw bericht is verzonden.&lt;br/&gt; U krijgt binnen 3 werkdagen een bericht terug.&lt;/p&gt;';
              } else { 
                  echo '&lt;p&gt;Er is iets mis gegaan tijdens het versturen van uw bericht.&lt;br/&gt; Probeert u alstublieft nogmaals.&lt;/p&gt;'; 
              } 
          } else if ($_POST['submit'] &amp;&amp; $human != '12') {
              echo '&lt;p&gt;U heeft de spam preventie som foutief beantwoord.&lt;/p&gt;';
          }
      } else {
          echo '&lt;p&gt;Alstublieft alle velden invullen.&lt;/p&gt;';
      }
  }
  </code></pre>
  
  <hr>
  
  <h3>HTML</h3>
  
  <pre><code>&lt;form method="post" action="contact.php"&gt;
      &lt;label&gt;Naam&lt;/label&gt;
      &lt;input name="name" placeholder="Naam"&gt;
  
      &lt;label&gt;Email&lt;/label&gt;
      &lt;input name="email" type="email" placeholder="Email"&gt;
  
      &lt;label&gt;Onderwerp&lt;/label&gt;
      &lt;input name="subject" placeholder="Onderwerp"&gt;
  
      &lt;label&gt;Bericht&lt;/label&gt;
      &lt;textarea name="message" placeholder="Laat hier ook uw telefoonnummer achter als u telefonisch contact wilt."&gt;&lt;/textarea&gt;
  
      &lt;label&gt;&lt;strong&gt;*Spam preventie*&lt;/strong&gt;&lt;br/&gt;Wat is 11+1?&lt;/label&gt;
      &lt;input name="human" placeholder="11 + 1 ="&gt;
  
      &lt;input id="submit" name="submit" type="submit" value="Verzend"&gt;
      &lt;label&gt;&lt;u&gt;Alle velden zijn verplicht.&lt;/u&gt;&lt;/label&gt;
  &lt;/form&gt;
  </code></pre>