title: jQuery Get Value From Looping in PHP
body: <p>I'm using jQuery. Now I want to get value base on ID value from textbox loop.</p>
  
  <p>Example :</p>
  
  <pre><code>&lt;?php
  while
  {
  $id = $d['id'];
  ?&gt;
  &lt;input type="text" name="text" id="txt" value="&lt;?php echo $id; ?&gt;"/&gt;
  &lt;input type="submit" class="btn_confirms" id="txt&lt;?php echo $id; ?&gt;" value="Go"/&gt;
  &lt;?php
  }
  </code></pre>
  
  <p>and jQuery like this:</p>
  
  <pre><code>$(function() {
  $(".btn_confirms").click(function()
  {
  var txt_id = $('#txt').val();
  alert(txt_id);
  }
  });
  </code></pre>
  
  <p>Example if I have 3 data.
  The problem is, when I click button Go, it just show first value of PHP loop. Another button Go 2 &amp; 3 is show same value.</p>
  
  <p>Any help, please.</p>