title: search by category with php mysql
body: <p>hello im using this code to do search</p>
  
  <pre><code>    &lt;form action="arama.php" method="get"&gt;
  &lt;input type="text" name="lol"&gt;
  &lt;select name='kategori'&gt;
  &lt;option value="tum"&gt;Tum kategoriler&lt;/option&gt;
  &lt;? 
  while ($kat = mysql_fetch_array($kategori_isim)) {
  echo "
  &lt;option value=".$kat[kategori_isim]."&gt;".$kat[kategori_isim]."&lt;/option&gt;";
  } 
  ?&gt;
  &lt;/select&gt;
  &lt;input type="submit" value="ara"&gt;
  &lt;/form&gt;
  
  &lt;?
      $lol = mysql_real_escape_string($_GET['lol']);
      $kategori = mysql_real_escape_string($_GET['kategori']);
  
      if ($kategori == "tum") {
      $ara = mysql_query("select * from dosyalar where baslik like '%$lol%'");
      }
      else {
      $ara = mysql_query("select * from dosyalar where baslik like '%$lol%' order by kategori = '%$kategori%'");
      }
      ?&gt;
  </code></pre>
  
  <p>search by term works but not listing by kategori.. what can i do?</p>