title: How to pass variable between html tag, javascript and php
body: <p>I have several divs, which are made automatically by php script. Each div have and record from mysql database in it. And hidden input with value of unique ID. What I wan't to do is when I click on each of this divs, I would like to open overlay with div in middle and use this id to acces another data in database. I have working overlay. I just don't know how to pass that variable.</p>
  
  <p>It's something like this:</p>
  
  <pre><code>echo "&lt;div class='friend'&gt;".$a["username"]."&lt;input type='hidden' value='$id'/&gt;"."&lt;/div&gt;";
  </code></pre>
  
  <p>I hope someone will understand what I'm asking for. :) I know it's terrible explanation.</p>