Calling a javascript function while passing PHP variables
<p>I am trying use a javascript function while passing php variables in it. For example:</p>

<pre><code>onclick="alert(&lt;?echo $row['username']?&gt;)";
</code></pre>

<p>Now this does not work, instead gives an error-<code>ReferenceError: Can't find variable:right_username</code>(here the right_username is the answer i expect in the alert).</p>

<p>However if instead of <code>username</code> i use <code>EmpID</code>:</p>

<pre><code>onclick="alert(&lt;?echo $row['EmpID']?&gt;)";
</code></pre>

<p>EmpID being an int in the database works just fine.</p>
