bu kısmı

$resim = $_FILES[['resim']['name'];
şu şekilde değiştirdim ve halloldu

$resim = $_FILES[['resimler']['name'];
teşekkürler