Trying to unlink pictures using an id array it deletes the accounts but not the pictures can anyone help please, the selectrow id is different from id thanks
$delid = $_POST['selectrow'];
$nc = count($delid);
for($i=0;$i<$nc;$i++)
{
$did = $delid[$i];
$a = array($eg_Result1['id']);
foreach ($a as $v) {
// Get the file name
// Get the folder path
unlink('../images/userpics/'.$v.'.png');
}
setcookie('selectdelete', success);
mysqli_query( $eg_objConn1, "DELETE FROM `users` WHERE `xkey` = '".$did."'");
}
// Go to page
header("Location: manage_adminpanel.php?s=".@$_COOKIE['sort']."&xpage=".@$_COOKIE['xpage']."");
exit;