title: deal with a div within a while loop
body: <p>I have a while loop shows data items from a database, I want to deal with each item apart, but what I get is just the first div, for each iteration, I wanna take the 'id' of current iteration and deal with it, it's look like 'like' in facebook, when I click on the first 'like' a jquery runs a <code>$.post(..)</code> function and all go fine: treatements done with this id,
  but when I click on other next 'like's the post methode still sends the first id (checked out by firebug),
  code:</p>
  
  <pre><code>&lt;script type='text/javascript&gt;
    $("#like").click(function(){
      $.post("done.php",
        {id:$("#id").val()},
        function(data){
          ...
        });
     });
  &lt;/script&gt;
  
  &lt;body&gt;
  $result = myqsl_query("select * from ...");
  while($fetch = mysql_fetch_array($result){
  ..
  echo "&lt;input id='id' value='$fetch[0]'&gt;
  &lt;a href='...' id='like'&gt;like&lt;/a&gt;";
  ..
  &lt;/body&gt;
  </code></pre>
  
  <p>I hope I succeeded to describe the problem!
  Any solution with any language will be appreciated!
  Regards.</p>