So I am very confused on this one. Heres the deal. I am creating a database for a community and it displays every "friend's profile" that is linked to your own profile. That part works. It displays 3 profile pics per row. I then needed to create checkboxes under each one so once accept friend request was clicked, all the checked pics interacted with the database. That worked. Here is where the problem comes in.
I realized not many people have more then a couple friend requests at a time. So I'd rather display each pic on a different row and I would like each row to have their own accept and deny buttons. I put an array together with a hidden field to gather the values, however when I choose to display the array, it displays all of them. Can I get some help on how to select one value from the array? Some of the code is below.. thank you.
Form button:
<input name='rvalue[]' type='hidden' value='$ffriendid'>
<input type='submit' name='Submit3' value='Accept Friend Request'>
PHP Portion:
if($_POST['Submit3']){
$rvalue2 = $_POST['rvalue'];
array_map('intval',$rvalue2);
$rvalue2 = implode(',',$rvalue2);
mysql_query("UPDATE friendslist SET status='active' WHERE friend_id IN ($rvalue2) && user_id='$userid' || user_id IN ($rvalue2) && friend_id='$userid'") or trigger_error(mysql_error(),E_USER_ERROR);
}
Thanks again for any help..