Hi
I am working to get each value of the checked element and post them to php. But it only gets first value of just one checked item.
here is
$("#conf").click(function(){
var count = $("input:checked").length;
for(i = 0; i < count; i++) {
a = $("input:checked").val();
$.post("reqs.php?act=confirm", { ID: a }, function(data) { });
$('#'+a).parents(".req")
.animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
});
And HTML
<?php while ($info = mysql_fetch_assoc($result)) { ?>
<tr class="req">
<td style="width: 29px">
<input name="confirm" type="checkbox" id="<?php echo $info['ID']; ?>" value="<?php echo $info['ID']; ?>" />
</td>
<td style="width: 70px" class="style5"><?php echo $info['email']; ?></td>
<td style="width: 72px" class="style5"><?php echo $info['name']; ?></td>
<td style="width: 88px" class="style5"><?php echo $info['username']; ?></td>
<td style="width: 76px" class="style5"><?php echo $info['country']; ?></td>
<td style="width: 76px" class="style5"><?php echo $info['bus']; ?></td>
<td style="width: 67px" class="style5"><?php echo $info['website']; ?></td>
<td style="width: 97px" class="style5"><?php echo $info['music']; ?></td>
<td style="width: 78px" class="style5"><?php echo $info['radio']; ?></td>
</tr>
<?php } ?>
How can i get value of checked items in that for loop ?
Thanks