title: Search results with pagination code won't return results
body: <p>I'm having a hard time getting this search results with pagination code to work. It does successfully grab the search keyword entered in the html form on another page and brings it into this search.php page. if I echo $search I see the keyword on the page. But I get no results even though I should for the query. Can anyone see what might be going on?</p>
  
  <pre><code>require "PDO_Pagination.php";
  
  if(isset($_REQUEST["search_text"]) &amp;&amp; $_REQUEST["search_text"] != "")
  {
  
      $search = htmlspecialchars($_REQUEST["search_text"]);
      $pagination-&gt;param = "&amp;search=$search";
      echo $search;
  
      $pagination-&gt;rowCount("SELECT * FROM stories WHERE stories.genre = $search");
      $pagination-&gt;config(3, 5);
      $sql = "SELECT * FROM stories WHERE stories.genre = $search ORDER BY SID ASC LIMIT $pagination-&gt;start_row, $pagination-&gt;max_rows";
      $query = $connection-&gt;prepare($sql);
      $query-&gt;execute();
      $model = array();
  
      while($rows = $query-&gt;fetch())
      {
          $model[] = $rows;
      }
  }
  else
  {
      $pagination-&gt;rowCount("SELECT * FROM stories");
      $pagination-&gt;config(3, 5);
      $sql = "SELECT * FROM stories ORDER BY SID ASC LIMIT $pagination-&gt;start_row, $pagination-&gt;max_rows";
      $query = $connection-&gt;prepare($sql);
      $query-&gt;execute();
      $model = array();
  
      while($rows = $query-&gt;fetch())
      {
          $model[] = $rows;
      }
  }
  </code></pre>