I built a for each loop that pulls back several rows from the database. Each row it pulls has a link, and a hidden input box with a value of posting\_id. This link will work similar to a like button on facebook in a way. The hidden input box just stores the posting\_id. When you click the "like" link, it sends over the posting\_id to a jQuery page and pings back a page called community to tell it the user has "liked" the post.

**Here's the problem**

I'm pulling several rows, and it seems that only the top row being pulled is actually sending the data to the jQuery page when you click the "like" button. If I click on any other "like" button other than the top one it will not work at all.

**Jquery Page**

```
$('.bump_link').click(function(){ 
    var posting_id = $('.posting_id').val();    
    $.post("community.php", {
        posting_id: posting_id
    });
    alert(posting_id);
    $(this).toggleClass("bumped"); 
});

```

**Foreach Loop**

```
foreach ($result as $value) {
    $group_postings .= '
    <input type="text" class="posting_id" value="'.$value['posting_id'].'"> 
    <div id="bump_icon" class="bump_link"></div>
    <span id="counter"></span>
    ';
}

```

I hope I've made the issue clear, it was and is difficult to explain.