title: Hide complete table before a PHP search
body: <p>I have a PHP search form for searching in a SQL table.
  All together it works great, but there is one thing I like to change.</p>
  
  <p>The whole table is visible on the screen BEFORE the search.
  I would like to mention only the records after a search.</p>
  
  <p>Does anybody know to hide the table in PHP?
  Many thanks in advance!</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;form action="" method="post"&gt;
  &lt;input type="text" name="search" placeholder="Search"&gt;
  &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>&lt;?php 
  $host = "******";
  $user = "******";
  $password = "******";
  $database_name = "vangsten";
  $pdo = new PDO("mysql:host=$host;dbname=$database_name", $user, $password, array(
  PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION
  ));
  $search=$_POST['search'];
  $query = $pdo-&gt;prepare("select * FROM meldingen WHERE soort LIKE '%$search%' OR zone LIKE '%$search%'  LIMIT 0 , 10");
  $query-&gt;bindValue(1, "%$search%", PDO::PARAM_STR);
  $query-&gt;execute();
           if (!$query-&gt;rowCount() == 0) {
  
                  echo "&lt;table style=\"margin:50px auto;\"&gt;"; 
                  echo "&lt;tr&gt;&lt;td&gt;VISSOORT&lt;/td&gt;&lt;td&gt;LENGTE&lt;/td&gt;&lt;td&gt;AANTAL&lt;/td&gt;&lt;td&gt;ZONE&lt;/td&gt;&lt;/tr&gt;";
              while ($results = $query-&gt;fetch()) {
                  echo "&lt;tr&gt;&lt;td&gt;";            
                  echo $results['soort'];
                  echo "&lt;/td&gt;&lt;td&gt;";
                  echo $results['lengte'];
                  echo "&lt;/td&gt;&lt;td&gt;";
                  echo $results['aantal'];
                  echo "&lt;/td&gt;&lt;td&gt;";
                  echo $results['zone'];
                  echo "&lt;/td&gt;&lt;/tr&gt;";              
              }
                  echo "&lt;/table&gt;";        
          } else {
              echo 'Nothing found';
          }
  ?&gt;
  </code></pre>