Hello guys...
If I may ask you for help regarding checkboxes values..The boxes are names into array but $_POST returns only the last value. Here's the code:
The thing that checkboxes values or title returns correct user_id . But $_POST returns only the last array id of the last inserted picture to be deleted. Thank you for any help.
If I may ask you for help regarding checkboxes values..The boxes are names into array but $_POST returns only the last value. Here's the code:
Code:
in a while loop:
$mem_dir_add_pic .= "<a href='see_member.php?id=$user_id'><img src='members/avatar/avatar.jpg' width='41' height='60' border='1' align='left' hspace='3' vspace='5' style='border-color:black' alt='' title='' style='float:left'/><span class='style2' style='float:left;margin-top:55px;margin-left:-46px'> ".$user." </span></a>";
$mem_dir_add_pic .= "<form method='post' name='myform' id='myform' action='remove_members.php'><span style='float:left;margin-top:2px;margin-left:-5px'><input type='checkbox' name='del_mem[]' value='".$user_id."'/></span></form>";
}
$mem_check = $_POST['del_mem'];
if (($mem_check == $user_id) || ($mem_check2 == $user_id)) {
$proceed = mysql_query("DELETE FROM `members` WHERE friend_id='$mem_check' OR friend_id='$mem_check2' AND user_id='$uid' ");
}
The thing that checkboxes values or title returns correct user_id . But $_POST returns only the last array id of the last inserted picture to be deleted. Thank you for any help.