not alerting the variable value passed from onclick php function
<p>on click,
a)I am not getting alert, when i pass $picname variable to jquery img function(the value of the $picname is tulips.jpg)</p>

<p>b)i am getting the alert (22) when i pass the variable $picid(the value of the $picid is 22)</p>

<p>i think jquery function does not alert images extentions,if so then how can i pass the image name variable whose value having extension,to the jquery function to use its value</p>

<pre><code>function profile(){


$sql = mysql_query("SELECT * FROM profile");
    while ($row = mysql_fetch_array($sql)) {
        $picname= $row['picname'];
        $picid= $row['id'];

        ?&gt;


    &lt;table  style="margin-left: 110px"&gt;




        &lt;tr&gt;&lt;td&gt;&lt;a href="#img" class="ok"&gt;&lt;img style='width: 200px' src="images/&lt;?php echo $picname ?&gt;"   alt="name" onclick=img(&lt;?php echo $picname ?&gt;);  &gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;


    &lt;/table&gt;
&lt;?php


}}
</code></pre>

<p>jquery function is</p>

<pre><code>function img(n){
alert(n);
}
</code></pre>
