title: Add an error to the search form
body: <p>I've tried to add an error to the search form but it doesn't work, if you want see the demo you can go on <a href="http://www.svapomc.com/fastdl" rel="nofollow noreferrer">Svapomc.com</a> , please some one can help me? Thanks a lot</p>
  
  <pre><code>    &lt;/html&gt;
  &lt;head&gt;
      &lt;link href="cerca.css" rel="stylesheet" type="text/css"/&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;form action="" method="get"&gt;
  
      &lt;input type="text" name="search" placeholder="Cerca la mappa da scaricare (può essere pure incompleto)"/&gt;
      &lt;input type="submit" value="Cerca"/&gt;
  
      &lt;/form&gt;
  &lt;body&gt;
  
  &lt;/html&gt;
  
  &lt;?php
  //--- get all the directories
  $search = $_GET["search"];
  $dirname = 'maps';
  $findme  = "*.bz2";
  $dirs    = glob($dirname.'*', GLOB_ONLYDIR);
  $files   = array();
  //--- search through each folder for the file
  //--- append results to $files
  foreach( $dirs as $d ) {
      $f = glob( $d .'/'. $findme );
      if( count( $f ) ) {
          $files = array_merge( $files, $f );
      }
  }
  if( count($files) ) {
      foreach( $files as $f ) {
          if(strpos($f, $search) !== false and strpos($f, '.nav') === false and strpos($f, '.jpg') === false and strpos($f, '.txt') === false and strpos($f, '.jpe') === false or !isset($_GET["search"]) or $search == ""){
              $f1 = str_replace('maps/', '', $f);
              $f1 = str_replace('.bz2', '', $f1);
              $f1 = str_replace('.bsp', '', $f1);
              echo "&lt;div class='ciao'&gt;&lt;p&gt;{$f1} &lt;a download href='{$f}'&gt;Download&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;br&gt;";
          }
      }
  } else {
      echo "&lt;p&gt;Error message here&lt;/p&gt;";
  }
  ?&gt;
  </code></pre>
  
  <p>This is all the code i think the problem is in the else but i don't know</p>