title: pass javascript variable to php mysql select query
body: <p>I am running a mysql select query in php like this</p>
  
  <pre><code>&lt;?php
    $getvalue="SELECT id,name from table1 WHERE column1='$var1' and column2='$var2'";
    $result=mysql_query($getvalue) or die(mysql_error());
  
    while($row=mysql_fetch_array($result)){
         extract($row);
         echo $name;
    }
  ?&gt;
  </code></pre>
  
  <p>var1 and var2 are javascript variables on the same page. I know client side variable cannot be passed to server side. But is there any workaround as the variables are in the same page.</p>