title: basic PHP SQL - query multiple stuff from URL
body: <p>So, I wanted to use two params on the url to query  from my server but I'm not being able to do it.</p>
  
  <p>The url is : localhost/database/getTable?sLang=English&amp;sId=1</p>
  
  <p>The php Script is:</p>
  
  <pre><code>&lt;?php
  
  
  
  if(isset($_REQUEST['sLang']))
  if(isset($_REQUEST['sId'])) 
      {
  
      $con = mysql_connect("blabla","blablabla","blablabla");
      mysql_query("SET NAMES UTF8");
          if (!$con)
              {
              die('Could not connect: ' . mysql_error());
              }
          mysql_select_db("database", $con);
  
          $sLang = $_REQUEST['sLang']; //valor customer ID = valor requisitado
          SdID = $_REQUEST['sID']
          $result = mysql_query("SELECT * FROM table WHERE language = '$sLang' AND id = '$sId" ) or die('Errant Query:'); //escolher da tabela comments onde valor da coluna id = Valor reuisitado
  
          while($row = mysql_fetch_assoc($result))
              {
          $output[]=$row;
              }
  
          header('content-type: application/json; charset=utf-8');
  
          print(json_encode($output, JSON_UNESCAPED_UNICODE));
  
          mysql_close($con);
  
          }
          else
          {
          $output = "not found";
          print(json_encode($output));
          }
  
  
  ?&gt;
  </code></pre>
  
  <p>I'm just returning the sLang Values and the url changes to : localhost/database/getTable?sLang=English</p>
  
  <p>How can I query the database using the two params sLang and sId?</p>
  
  <p>Best regards</p>