I'm using a form with multiple checkboxes to select several rows and delete all of them, the code I use for that is:
foreach ($_POST as $valor){
$del_user = $_POST["borrar_usuario"];
$q_borrar = "delete from usuarios where id_user in ('$del_user')";
mysqli_query($con, $q_borrar);
echo "usuario borrado";
header('refresh: 3; url= exito.php');
}
But it does not delete anything. Any help, please?
These things?