title: php filter search results
body: <p>hello I developped a search form with php,which is working perfectly,but I would like to filter for example alphabetically,so I defined some  anchors in my html document
             A| B | ....</p>
  
  <p>In my php document,I added:</p>
  
  <pre><code>        $search=$_POST['query']//query is the name of input in a form,on the same html doc
          $letter=$_GET['by'];
  </code></pre>
  
  <p>from my sql query,</p>
  
  <pre><code>        $sql=SELECT Title FROM table where Title LIKE %search%;
  </code></pre>
  
  <p>I added :</p>
  
  <pre><code>          if(isset($letter)){
               $sql .="AND Name LIKE '$letter' ";
             }
  </code></pre>
  
  <p>My problem is that when I click for example on the link "A" it  always display all entry corresponding of all titles having names beginning of letter"A".(my Table has 2 columns,Title and Name) So I would like when I do a search to filter the results(getting when I click on "A" titles for which names begin by "A" and only those returned on the result of the search)</p>