title: Radio-buttons to change queries in php
body: <p>I'm trying to make a multi-lingual dictionary with one main language. I would like to use radio buttons to change languages (and the query in php)
  My idea is to have for example 3 radio-buttons: -English, -German, -Spanish. That is to change languages/queries.</p>
  
  <p>Now I have such a code (in index.php): </p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
  $(function(){
      $("form#search-form").submit(function(){
          $("#results").fadeOut();
          $.ajax({
              type:"GET",
              data: $(this).serialize(),
              url: "search.php",
              success: function(msg)
                  {
                  $("#results").html(msg);
                  $("#results").fadeIn();
                  }
          });
      return false;
      });
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>That was jquery script to get instantly results. And the search form in div:</p>
  
  <pre><code>&lt;div id='container'&gt;
  &lt;div id='search-box'&gt;
      &lt;form id='search-form'&gt;
          &lt;input type='text' id='input-text' name='s' value=''/&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In search.php:</p>
  
  <pre><code>$q = "SELECT * FROM lauk_pamed WHERE diakr LIKE '%".$search_term. "%'or mask LIKE '%" .$search_term. "%' ORDER BY words LIMIT 21";
  $r = mysql_query($q);
  
  
       if(mysql_num_rows($r)==0)//no result found
      {
      echo "&lt;div id='search-status'&gt;Nothing was found&lt;/div&gt;";
      }
   else //result found
      {
      echo "&lt;ul&gt;";
      while($row = mysql_fetch_assoc($r))
          {
          $prus = str_ireplace($search_term, "".$search_term."", $row['wirds']);
          $des = $row['descr'];
  ?&gt;
  </code></pre>
  
  <p>So my idea is: if -English is on, than query must be: </p>
  
  <pre><code>    $q = "SELECT * FROM lauk_pamed WHERE diakr LIKE '%".$search_term. "%'or english LIKE '%" .$search_term. "%' ORDER BY words LIMIT 21";
  </code></pre>
  
  <p>if -German is on, than query must be: </p>
  
  <pre><code>    $q = "SELECT * FROM lauk_pamed WHERE diakr LIKE '%".$search_term. "%'or german LIKE '%" .$search_term. "%' ORDER BY words LIMIT 21";
  </code></pre>
  
  <p>And so on. How could I do it using radio-buttons? </p>