title: PHP with Javascript to access database
body: <p>Suppose I define a an application in php 
  which has as into the  Tag as an internal javascript 
  and a variable 'abc' defined into the js as follows :</p>
  
  <pre><code>var abc;
  </code></pre>
  
  <p>now i want to assign a new value to the variable which will be fetched from a MySQL db</p>
  
  <p>example :</p>
  
  <pre><code>var abc = $mysql(select id from dB_table where .....xyz )
  </code></pre>
  
  <p>will it be under the scope of abc to retrieve date from MySQL db?
  how is it achievable?</p>
  
  <p>PS : i will be using php to connect to the db</p>
  
  <pre><code>mysql_connect(servername,username,password)
  </code></pre>