title: PHP show result without refresh
body: <p>Here is the php code I want to show if domain is available or not in same page without refresh</p>
  
  <pre><code>    &lt;form id="" method="post" class="cont"&gt;
          &lt;input type="text" name="domain_name" class="srchFld" placeholder=""/&gt;
          &lt;select class="tldFld" name="suffix"&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=".dz"&gt;.dz&lt;/option&gt; &lt;/select&gt;
          &lt;div align="center"&gt;&lt;button type="submit" name="check" class="srchBtn" id="loadbasic"&gt;Search&lt;/button&gt;&lt;/div&gt;
      &lt;/form&gt;
  
  &lt;?php
  if(isset($_POST['check'])) {
  
   if (!empty($_POST['domain_name'])){
   $name_domain = trim($_POST['domain_name']).$_POST['suffix'];
   $response = @dns_get_record($name_domain, DNS_ALL);
   if(empty($response)){
   echo "&lt;H2 style='color:green;' &gt;Domain $name_domain is available.&lt;/H2&gt;";
  
   }else{
   echo "&lt;H2 style='color:red;'&gt;Domain $name_domain has taken.&lt;/H2&gt;";
   }
   }
   else {
   echo "&lt;H2 style='color:red;'&gt;Error: Domain name can not be left empty.&lt;/H2&gt;";
   }
  }
  ?&gt;
  </code></pre>
  
  <p>when this code runs, it refreshes same page and shows if the domain is working or not while what I want is to load everything in the same page
  Thanks in advance for your help</p>