title: PHP database search issue
body: <p>I have an issue with some code. It's a HTML file that sends a string to a PHP file which then searches an offline database and it returns a link to the html page. Each time I search it states there are no results found.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>&lt;?php $searchfor=$_GET['keyword'];
  $contents=file_get_contents('/users/tutors/mhtest15/share/shakespeare/home.html', true);
  if (stripos($contents, $searchfor) !==false) {
    $startpos=stripos($contents, $searchfor);
    $getcode=substr($contents, $startpos, 150);
    $isolate=explode('"', $getcode);
    $sendlinkback='https://ebooks.adelaide.edu.au/s/shakespeare/william/'.$isolate[1];
    echo "&lt;br&gt; &lt;a href ='".$sendlinkback ."'&gt;The file $searchfor Exists here&lt;/a&gt;";
  }
  
  else if ($isolate !=='$searchfor') {
    echo "&lt;li&gt;no results to display&lt;/li&gt;";
  }
  
  ?&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  
  &lt;head&gt;
    &lt;title&gt;William Shakespeare Archive Search Engine&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
    &lt;p&gt;
      &lt;p&gt;
  
        &lt;div id="container"&gt;
          &lt;center&gt;&lt;img src="https://s-media-cache-ak0.pinimg.com/originals/fc/20/b4/fc20b40a4447af0bc71746bf47d2849e.jpg" alt="Shakespeare Image" height="400" width="350"&gt;
  
            &lt;h1&gt;Shakespeare Search Engine&lt;/h1&gt;
  
          &lt;/center&gt;
  
          &lt;div style="text-align: center"&gt;
            &lt;br&gt;
            &lt;form action='test.php' method="GET" id="search" name="search"&gt;
              &lt;input class="button" type="submit" value="Search"&gt;
              &lt;input name='search' style="width:200px;font-size:14pt;" placeholder="Search term..."&gt;
            &lt;/form&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks in advance for any help provided.</p>