title: PHP - How to hide the form after it's submitted
body: <p>I have a domain name check form that i have in a container. After I submit the form the availability of the domain name is checked and a message is shown in the same container as the form. When the message is shown, I want the form and first H2 to disappear. How can i do this?</p>
  
  <p>My code:</p>
  
  <pre><code>&lt;div id="domain-name-check"&gt;
      &lt;h2&gt;Is uw domeinnaam nog vrij?&lt;/h2&gt;
      &lt;form method='post' class="clearfix"&gt;
          &lt;input type=text name=domain&gt;
              &lt;select name="suffix"&gt;
                  &lt;option value=".nl"&gt;.nl&lt;/option&gt;
                  &lt;option value=".be"&gt;.be&lt;/option&gt;
                  &lt;option value=".com"&gt;.com&lt;/option&gt;
                  &lt;option value=".net"&gt;.net&lt;/option&gt;
                  &lt;option value=".org"&gt;.org&lt;/option&gt;
                  &lt;option value=".biz"&gt;.biz&lt;/option&gt;
                  &lt;option value=".info"&gt;.info&lt;/option&gt;
                  &lt;option value=".mobi"&gt;.mobi&lt;/option&gt;
                  &lt;option value=".ws"&gt;.ws&lt;/option&gt;
                  &lt;option value=".cc"&gt;.cc&lt;/option&gt;
              &lt;/select&gt;
              &lt;input type=submit name=proses value=Check&gt;
      &lt;/form&gt;
      &lt;?php
      if(isset($_POST['proses'])){
          $domain_name = "$_POST[domain]"."$_POST[suffix]";
          $arrHost = @gethostbynamel("$domain_name");
          $date = date('y-m-d');
  
          if(empty($arrHost)){
              echo "&lt;h2&gt;$domain_name is beschikbaar&lt;/h2&gt; &lt;a href='/offerte-aanvragen/".$domain_name."/'&gt;Vraag een offerte aan&lt;/a&gt;";
              $availability = "yes";
          }else{
              echo "&lt;h2&gt;$domain_name is helaas bezet&lt;/h2&gt; &lt;a href='/offerte-aanvragen/".$domain_name."/verhuizen/'&gt;Verhuis uw domein&lt;/a&gt;";
              $availability = "no";
          }
  
          mysql_query("INSERT domainnames SET dns='".$domain_name."', available='".$availability."', timestamp='".$date."'")or die(mysql_error());
  
      }
      ?&gt;
  &lt;/div&gt;
  </code></pre>