How to send some data from dynamic form using jquery?
<p>I am trying to send data from dynamicly generated cheboxes(when ticked) to my php script, and then to mysql data base. I've got something like that: </p>

<hr>

<pre><code>form method="post" id="form"&gt;
&lt;input type="checkbox" id="1" name="tick"&gt;
&lt;input type="checkbox" id="2" name="tick"&gt;
&lt;input type="checkbox" id="3" name="tick"&gt;
&lt;input type="checkbox" id="4" name="tick"&gt;
&lt;input type="checkbox" id="5" name="tick"&gt;
&lt;input type="checkbox" id="6" name="tick"&gt;
&lt;/form&gt;
</code></pre>

<p>(amount of checkboxes is not const!)</p>

<hr>

<pre><code>$(document).ready(function(){
 $("form#form").check(function() {
  var achieved = $('input[check]');
  var id = $('input[id]');

  var data = 'achieved=' + achieved.val() + '&amp;amp;id=' + id.val();

  $.ajax({
   type: "POST",
   url: "change.php",
   data: data,
   success: function(){
    $('div.changed').fadeIn(400);
    setTimeout(function(){ $("div.changed").fadeOut(400) }, 4000);
   }

  });
  return false;
 });
});
</code></pre>

<hr>

<p>What did I wrong?</p>
