title: Search w/ MySQL/PHP but not Case-Sensitive
body: <p>I learned in school to program a search with MySQL and PHP.</p>
  
  <p>I have this code for my search.php:</p>
  
  <pre><code>&lt;?php
  mysql_connect("localhost", "root", "");
  mysql_select_db("db1");
  
  $sql = "SELECT * from tuser";
  $Namen = mysql_query ($sql);
  $user_id = $_GET['user_id'];
  $search = $_GET['search'];
  
  while ($ergebnis_datensatz = mysql_fetch_array($Names)){
      $user_id = $ergebnis_datensatz['user_id'];
      $name = $ergebnis_datensatz['name'];
      $surname = $ergebnis_datensatz['surname'];
  
      if ($name == "$search") {
          echo "$name $surname";
      }
  
      else {
          echo "";
      }
  
  
      if ($surname == "$search") {
          echo "$name $surname";
      }
  
      else {
          echo "";
      }
  
  }
  
  
  ?&gt;
  </code></pre>
  
  <p>And on my Search input site i have an simple input with the "name=search"</p>
  
  <p>If I use this search now, it's case sensitive. Example: I search for "*<em>k</em>*elvin" and nothing appears. But if search for "*<em>K</em>*elvin" i get my results.</p>
  
  <p>How can i make it not case-sensitive?</p>