show data in lightbox
<p><img src="http://i.stack.imgur.com/Wy9ab.jpg" alt="enter image description here"></p>

<p>i want to show related data on click red circled image in light box but when i click it always shows the data in light box of the first record in the table i want to show concern record of click ,my code is here in JavaScript i have write these lines of code</p>

<pre><code> &lt;script&gt;
 function manageLightbox(visibility,id) {
 document.getElementById('overlay').style.display = visibility;
 document.getElementById('content').style.display = visibility;
 }
 &lt;/script&gt;
</code></pre>

<p>i have called this function in my html</p>

<pre><code>&lt;a href="#"&gt;&lt;img src="images/core/icon16/zoom.png" title="View" onClick="return manageLightbox('block','&lt;?php echo $res['id']?&gt;');" /&gt;&lt;/a&gt;
</code></pre>

<p>the html of my light box is just here</p>

<pre><code>&lt;div id="content" class="content"&gt;
&lt;a href = "javascript:void(0)" onClick="return manageLightbox('none')"&gt;
&lt;img  src="images/images1.jpeg" style="width:25px; height:25px; float:right"/&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;center&gt;
    &lt;table&gt;
        &lt;tr&gt;
           &lt;td&gt;Product_ID&lt;/td&gt;
           &lt;td&gt;&lt;input type="text" name="product_id" value="&lt;?php echo $row['id']; ?&gt;"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Name&lt;/td&gt;
            &lt;td&gt;&lt;input type="text" name="name" value="&lt;?php echo $row['name']; ?&gt;"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
      //and all other fields in light box ....
    &lt;/table&gt;
&lt;/center&gt;
&lt;/div&gt;
&lt;div id="overlay" class="overlay" onClick="return manageLightbox("")&gt;&lt;/div&gt;
</code></pre>
